[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Tips for beginner progammers
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 160
Thread images: 15
File: image.jpg (58 KB, 750x422) Image search: [Google]
image.jpg
58 KB, 750x422
>>
>>52583744
>Tips for beginner progammers

1) Don't ask /g/

2) Don't get infected by autism, it's contagious and incurable and will forever ruin your ability to enjoy programming
>>
>>52583776
Meme
>>
>>52583744
>inb4 install meme

Read books and not just crap overflow.
>>
>>52583744
Do codeacademy first, watch TheNewBoston and PHPacademy (recently renamed themselves for something else) for the real basics.

Then you might want to consider to take a leap of faith into something specific and start to read up/youtube those. Later you might want to download some books for it, and pretty much thats about it. There's nothing to it, just time and being committed enough.

I failed, good luck.
>>
Have an end goal or idea that you want to actually use the programming for, otherwise you will never actually care enough to learn anything past elementary concepts.

Anyone that has tried to learn to program and failed did so because they had no actual reason to learn other than "i want a job" or whatever.
>>
>>52583744
Do every single codingbat exercise.
http://codingbat.com/

Also learn math. You can't do the cool stuff without it.
>>
Don't ever bother asking "which programming language should I learn?" The differences between them are meaningless to a beginner, you'll just be distracting yourself instead of actually coding. Pick a language with lots of documentation and tutorials (java, c++ and python are decent candidates). That's what matters for you right now.

Programming languages aren't like spoken languages. When you've learned one you've basically learned them all. Get used to working with the coders mindset and then you can experiment with other languages as your interests and jobs require.
>>
File: InstallGentoo.png (35 KB, 300x250) Image search: [Google]
InstallGentoo.png
35 KB, 300x250
>>52583744
>>
>>52583776
This
>>
>>52584159
this

Everyone I know who is successful does technical shit including programming as a hobby

All the retards that utterly fail to do anything are the ones who have 0 passion for it
>>
>>52583744
Learn programming in general instead of memorizing a language, a technology or a stack.
>>
> Be clean
> Don't write Spaghetti code
> Less code is a better code.
>>
>>52583744
Never do Java
>>
>>52584768
>Learn programming in general instead of memorizing a language, a technology or a stack.

Yeah, but how?
>>
It can get very, very frustrating. Learn to anticipate that frustration will come. When it does, handle it as best you can. Often, taking a break out taking to someone helps. Eventually you will learn to smile at the inevitable frustrating circumstances.
>>
>>52584791
by this he means use as many labels and gotos as you can
>>
>>52585052
And avoid using functions or method, they confuse the reader. And where you do need to use them, make sure they do as much as possible so you don't need so many of them.
>>
>>52583776
This
>>
>>52583776
This
>>
>>52584159
>>52584334
the only good advice ITT
>>
>>52584822

Learn several languages and mess around with a compiler language like yacc or bison and at some point you will understand that all programming languages are the same underneath it all.
>>
So I'm considering switching to CS
Is there anything I should read to prepare?
Sorry for the hijack I
>>
>>52583744
Read this FREE online Git book (mostly just chapters 1-3 and chapter 6)
http://git-scm.com/book/en/v2

You can learn to use Git from the command line in literally a couple hours and won't look bad if/when an employer needs you to use Git (and yes, using a GUI application looks bad too, it's a crutch).

Put all of your projects on Github so that further down the line you will have something to show for all the challenges and practice projects that you've done.

A Github with tons of projects showcasing your abilities is a huge plus in actually getting a job. It's also necessary to know some kind of version control software to collaborate on bigger projects. tl;dr just fucking read the book.
>>
>>52585295
suck a dick

>>52585315
we're not here to work for other people you shill fuck
>>
>>52584822

Read you a SICP. Seriously. I'm not even memeing.
>>
File: 1442469690886.jpg (129 KB, 1124x1024) Image search: [Google]
1442469690886.jpg
129 KB, 1124x1024
>>52585389
Helping you get a job is just one of the benefits, retard. Git is useful even if you only use it for yourself or just to collaborate with other people on something. It's also useful for keeping track of your work and keeping things nicely organized.
>>
>>52583776
What do you mean with autism?
>>
>>52585315
>>52585425
>>52585440
$0.05 has been deposited into your account
>>
File: 1423938374382.jpg (37 KB, 500x500) Image search: [Google]
1423938374382.jpg
37 KB, 500x500
>>52585461
It's a free book for free software written by the people who made linux
REEEEEEEEEEEEEEEEEEEEEE

>implying I don't get just as many keks out of replying to you as you do by shitposting
>>
>>52583776
/thread
>>
>>52585493
>>52585493
we all have fun here
>>
>>52583744
get out while you still can
>>
Learn bitwise operators if you need performance.

You can modulus by powers of two by performing a logical and (& 0x03 is the same as modulus by 4)

You can multiply a number by 2 shifting bits to the left one ( << 1)

Most compilers will probably do this for you but its cool to know.
>>
>>52585425
It's really a great book, I have to say of all the programming books I've read or skimmed, SICP is the most rigorous but also one of the most rewarding to get through. Lots of great insight even if you never touch Scheme again.
>>
>>52585100

>Avoid using functions
>As long as possible

you dont know shit about abstraction I'm guessing?
>>
>>52584126
>I failed
>so do what I did

Anon pls
>>
>>52584126
>>52586374
If you really want to get into programming, you're gonna have to read some books. Youtube and internet searches will only get you so far.

You have to get a deeper understanding of how to program in whatever language you choose, rather than googling something every time you don't understand what to do or why your program doesn't work.
>>
>>52583744
Have you tried reading a book?
>>
>>52583744
POO IN LOO
>>
>>52583744
>>52588017
>>52588057
The /g/entooman collection of books found in the /g/ sticky is a great free resource of helpful books. You should be able to find a book in there for whichever language you choose. I recommend you start with C or C++.
>>
>>52584334

Good advice, other than:

>When you've learned one you've basically learned them all.
Yeah, go write Prolog after having only coded Java.
>>
>>52585493
>people who made linux
No
>>
File: 1441245417854.png (18 KB, 1280x658) Image search: [Google]
1441245417854.png
18 KB, 1280x658
>>52588242
>this person created the distributed version control software known as git
>who is linus torvalds
>>
>>52588284
>linus
>sicp

you trolled me. happy?
>>
>>52588299
my post (about git being made by the people who made linux) was in response to another poster who was shitposting that I was a shill for advocating that OP learn to use Git.

Simple misunderstanding m80
>>
>>52585100
>>52586248

I was thinking the same thing. Just seemed wrong while I was reading it. I prefer the exact opposite (more functions with very specific uses)
>>
>>52588334
Oh, I see. My bad.
>>
>>52583744
learn the fundamentals
var,bool,arr,num,float,int,string,if,else,for,when,function,class,object then choose a language.
>>
>>52584791
>Less code is a better code.

'no'
>>
>>52588402
you misspelled eq, cons, car, quote, cdr, atom, defun
>>
>>52583776
Who are you kidding? Every programmer is at least slightly autistic and amount of autism scales with amount of programming skill. Are you one of those python skids?

Over the years I have built up enough autism points to become a grand meister of programming and I'm enjoying every second of it.
>>
>>52586248
>>52588349
This is why we can't have jokes here
>>
Decouple yourself from the idea of thinking that the language you use is the most important thing.

Focus on learning fundamentals and universal topics.
>>
>>52588522
Sorry, didn't get the joke because I've seen this in practice and it's horrifying. I have to assume there are people who think it's a good idea.
>>
>>52588430
lame reply
>>
File: 1445525448153.jpg (14 KB, 378x442) Image search: [Google]
1445525448153.jpg
14 KB, 378x442
>>52588483
But how many GBP do you have? Checkmate ya dip
>>
>>52588545
Using functions sacrifices performance for less coding. If you put code anywhere outside of main, you're wasting stack space and making the cpu perform unnecessary operations to call functions because YOU are fuckign LAZY.
>>
>>52589317
>I don't want to build my own library over time so I don't have to reinvent the wheel!
>I like having my code be hard-to-read shit!
>>
>>52589317
I guess I just care about the people viewing / working with my code. I'll sacrifice the "performance" loss for better readability since I'm not the only one touching the codebase.
>>
>>52590162
If you can't follow along in main for 1000+ lines of code, you shouldn't even be a programmer.
>>
>>52583744
Poo in loo
>>
>>52590948
/thread
>>
>>52583776

If you enjoy programming you are autistic and you should learn to cope with it
>>
>>52585425
do this
>>
>>52585425
This sounds like a maymay.
>>
>>52583744
Where are the tips?
>>
Doing projects is always more important than reading articles or books. That doesn't mean you shouldn't read any, in fact you have to read a lot so you don't make mistakes, but you will not become a good programmer if you don't program in your free time.
>>
>>52588483
>autism is something you build up
>>
>>52584791
>> Be clean
FUCKING THIS
>> Don't write Spaghetti code
FUCKING THIS
>> Less code is a better code.
FUCKING THIS

I cannot stress enough how important these three things are.
>>
>>52583744
>>52592727
Don't be afraid of writing bad code (assuming it is functionally correct) as a beginner. It's good to get experience by completing your task fully then going back to introspect the logic that you used.
>>
1) ignore everything /g/ says, possibly including this
2) use the right language for the job. look at what other people in the field are using. look where the libraries are. use that.
3) learn by doing. use books only for reference
4) learn javascript even though it sucks
5) learn version control
6) learn linux
7) solving textbook-style problems is a shit way to learn to code. build a goddamn application
8) which fucking dev environment\ide\text editor you use doesn't fucking matter at any time
9) if there is a library for it, use it. all programming problems are only solved once.
10) don't write your own cryptography\login system\account system under any circumastances

there. ten commandments.
>>
>>52583968
Also >>52583744 stay away from sites like HackerNews and Product Hunt. All they do is follow whatever is currently trendy. Just know your data structures and go read books on whatever field you wish to study. Anything from O'Riley Publishing is usually good.
>>
>>52584159
>they had no actual reason to learn other than "i want a job" or whatever
This is why I'm getting out of school now with a BA in CS while I still have my sanity (and my credit rating). I used to love building things, but all I see anymore are C structs and kernel calls. Heck, I broke up a Linux argument the other day. That was the breaking point.

I can't wait to develop for passion again once I'm in the real world.
>>
>>52584181
>Also learn math. You can't do the cool stuff without it.
On top of that, look up Dr. Steven Chu's videos on metacognition. You can't grasp advanced math concepts without knowing how to actually learn them.
>>
>>52584334
>When you've learned one you've basically learned them all.
True. I'd recommend starting with Java since it holds your hand only enough to stop you from fucking up your computer. Most of everything else carries over from C/C++. Compiled language, class structure, and follows a lot of CS theory. If you can learn Java, you can learn almost everything related to programming imho tbqh familie.
>>
>>52583744
Don't start.
>>
>>52584793
It's good as baby's first language for starting out. But you never want to make it your specialty.
>>
>>52592815
>>> Less code is a better code.
>FUCKING THIS
Well short and sometimes obfuscated code is literally worse than Hitler.
So you gotta think a bit before doing that trade off.
More isn't always less.
Less isn't always more.
Atleast when it comes to coding.
>>
Pick up C until you can appreciate what a pointer is and how you can allocate memory. Figure out the difference between the heap and the stack memory regions.

Unless you really enjoyed C, pick up another language like python, java or scala which lets you write a lot of code without the difficult bug hunts that C will throw in your face which you are in no way prepared for.

Ideally you should use a terminal and at least try to use vim or emacs instead of your standard language specific IDE

Never code PHP
>>
File: 3423462346.jpg (48 KB, 529x700) Image search: [Google]
3423462346.jpg
48 KB, 529x700
yo boys how do i make vbscript click a fucking message box that comes out of nvidia inspector profile import?

Here's what i got, but it just opens the profile like 10 times instead of closing the popout after the first run.

Dim prog
Set prog = CreateObject("Wscript.Shell")
prog.Run "c:\fps.nip", 0, False
prog.AppActivate "NVIDIA Inspector"
prog.SendKeys "{ENTER}"
>>
>>52593089
>Pick up C
Please don't use C until you understand why using strcpy instead of strncpy is considered harmful.
>>
>>52593060

Try witing functional scala, haskell, prolog or some lisp dialect nigga
>>
>>52593135
strncpy is also consider harmful, unless you have a fixed width string.
Use strlcpy.
>>
>>52593135

The idea was to switch language to something more beginner friendly before the issue of strings which are a fucking pain in the ass and a minefield for beginners (and intermediates) came up.
>>
>>52593174
>strlcpy guarantees to null terminate the string
That's cool I guess. But what if I'm using a non-GNU version of C?
>>
>>52593189
I typically use Python for anything related to heavy String matching and analysis. Better built in functions and MOTHER FUCKING STRING SLICING.
>>
>>52593218

Yeah, no beginner should have to struggle with archaic conventions like null termination and arrays that arent object with length getters etc.

Of course, everyone should try their hands at cowboy-coding in C with all sorts of risky pointer management, but it's not the sort of thing you do when you're starting out.
>>
File: 1453207485070.jpg (2 MB, 2272x1704) Image search: [Google]
1453207485070.jpg
2 MB, 2272x1704
What are some of the best resources (i.e. books) for learning Python, Java, and C++?
>>
At what point should I learn about making GUIs?
I just started reading "The C Programming Language" and I just wanted to know so that I can layout a learning plan.
>>
>>52593778
When you start masturbating to compiler output only then are you ready for guis
>>
>>52593428
Start with Codecademy for python.
>>
File: csi-ny-epilogue-gary[1].jpg (39 KB, 499x339) Image search: [Google]
csi-ny-epilogue-gary[1].jpg
39 KB, 499x339
>>52585440
Can I get that image in a higher resolution?
>>
>>52588216
>cherry picking for no reason other than to disagree
>>
1. If a program works great, don't try to completely redesign it after you learn something new. Apply the newly learned skills to another program.

For example, when you learn object oriented programming, you'll be tempted to go back to things and redesign it with oop in mind.
>>
File: 1445638211635.jpg (10 KB, 247x250) Image search: [Google]
1445638211635.jpg
10 KB, 247x250
>>52595257
>never refactor code
>>
>>52595273
Unless you're bored and have nothing to do.

I spent a couple weeks making a script that scrapes websites, and later I learned oop but I ain't going back to that and redoing it all when it still works fine.
>>
>>52583744
Stay away from C++
>>
>>52595304
Why?
>>
File: 4chan2.jpg (109 KB, 768x1024) Image search: [Google]
4chan2.jpg
109 KB, 768x1024
>>52595286
>>52595257
>you only refactor when you learn new things
>>
>>52585389
I am.
>>
File: allahu_snackbar.jpg (108 KB, 804x452) Image search: [Google]
allahu_snackbar.jpg
108 KB, 804x452
>>52583744
1. Complete the nand2teris course. IMHO it's a must-have introduction to anything computer related. That's the moment when you start to actually understand how a computer works, instead of learning to simply operate and sometimes fix it with experience and googling like the average Joe.

2. When you don't *exactly* understand even a single word in some tech reading, immediately go look it up. Reading technical stuff without fully understanding the terms is tiring and won't teach you anything.

3. Get a mentor if you can and do your programming with him in the vicinity and ask him when you get stuck. His ten-minute explanation can save you a week of googling and try-failing.
>>
>>52595335
>Why?

Too complicated for a beginner. Actually too complicated for an expert also. Start with something simpler.
>>
>>52595682
What? They teach c++ to people who've never programmed. It's easy as fuck if you don't start out with making classes.
>>
File: 1402028778574.jpg (140 KB, 778x1018) Image search: [Google]
1402028778574.jpg
140 KB, 778x1018
dont use retarded variable names like

>int a;
>>
File: 1446938439025.jpg (39 KB, 578x472) Image search: [Google]
1446938439025.jpg
39 KB, 578x472
>>52595682
>c++ too complicated to start with
maybe for dumbasses like you anon
>>
>>52592902
>9) if there is a library for it, use it. all programming problems are only solved once.
ehhh, I think you should at least try to understand the fundamentals of the problem before jumping to a library

the point of using a library is that the dirty work is done for you already and you have a clean high-level interface. but if you don't understand why that clean interface is necessary or useful you won't really get why you needed it anyway, and the only way to know that is to get at least a little bit into implementing it yourself.
>>
>>52595682
kek
>>
>>52595731
>>52595787
>>52595872

How many of you have actual working experience of C++? C++ is a monster.
If you think C++ is easy you are a noob.
>>
>>52596072
>working in a job with other developers should be applied to babbies first steps

Everyone uses an IDE in the field too, but that doesn't mean someone should learn how to do Hello World with one.
>>
IDEs are for people with long-term memories so deficient they can't remember their own name.
>>
Im taking cs110 because it counts as a math skill at my college

Its html and css. My professor has aspergers (he told the whole class and said this might make him seem mean or anti social)

For someone who has never programmed anything and knows nothing, will this be easy? Really need the credit.
>>
>>52596072
I'm not any of those that you are replying to.

I have actual working experience with C++ and C (and a bunch of other languages) as I used to be both an application developer (mostly using C++) and an embedded developer (using C++ almost exclusively).

Yes, C++ has tonnes of gotchas, and to a newcomer it might be a bit overwhelming. However, if you have a fairly good knowledge of C and understand object-oriented mentality (from having used Java or C# or any other heavily object-oriented languages), C++ isn't that hard to grasp.

I mean, still you got to look out for gotchas (exception safety for example, pre-C++11 auto_ptrs, function-static variables in a multi-threaded environment, in-efficient deep copying auto-generated ctors etc)... Yes, understanding template syntax can be hell the first three hundred times you try...

As someone who has been using C++ for the last 4 years and still actively use C for some stuff (7-8 years experience in C), I will say that the higher-level features that come with C++ and its standard library alone is worth using it over C.

I mean, you have STL containers, iterators, smart pointers... These all make C++ very comfy to work with. It's definitively not a monster.
>>
1) If you learn Java, learn C# as well. Companies are starting to use it more and more as it works well for Windows based applications.

2)Do some fucking research. Some programming languages for some projects are way different at handling and performing that project than other languages. For instance C has speed and flexibility in mind, therefor it's great for embedded systems, while something like PHP is great for Web servers.

3)Try to main in something that is easy for you to handle, does what you need it to do, but is powerful enough that it is accepted by many people so you have a job.

3)By god if the language uses a semicolon to end statements, please know how to use them and always remember how to use them. Don't know how many times I've seen a beginner flip shit because his/her thing didn't work simply because of a single semicolon.

4) Don't listen to fa/g/s, they're annoying and will try to make you follow memes or just dumb shit in general just to have "cool points" in the community. You're not cool for doing them, and you should feel bad if you do.

5)Have fun with it. If you don't have fun making shit and spending hours and hours debugging if something didn't turn out like it's supposed to, then don't even bother. It will turn into a chore and you will hate yourself.
>>
>>52596159
>i only use nano for my 1337 code because it is better... somehow
>>
>>52585315
This is actually one of the few decent bits of advice ITT. No one is going to want you if you can't even use SCM.
>>
>>52596159
>>52596139
>>52596217

Friendly reminder that editors that have heavy plug-in functionality such as vim, Emacs and nano can easily be turned into full-fledged IDEs with features such as compiler output parsing, code completion, easy code navigation, in-code debugger front-end etc
>>
I primarily use c++.
It is not an small language, but you can quickly learn enough to get started within a few weeks and grow from there.
Easy doesn't mean no learning curve, it means that it is something you can learn quickly.
>>
>>52596240
>Easy doesn't mean no learning curve, it means that it is something you can learn quickly.
This
>>
>>52596200

C and C++ are fine for a lot of tasks. I have used C++ as "C with classes" for embedded projects.
However as a beginner you need *CONCEPTS*. C++ is basically a language designed to micromanage your computer resources.
There are a lot of other paradigms in programming.
I suggest looking at sosmething like SICP to broaden you view.
>>
>>52583776
this
>>
>>52596190
>html
>css
>will this be easy?
Yes
>>
>>52596257
>C and C++ are fine for a lot of tasks. I have used C++ as "C with classes" for embedded projects.
Using C++ as "C with classes" is a horrible misuse of C++ IMHO, but still, it is convenient sometimes. As someone quite fond of C++ I would recommend that you try to program idiomatic C++ instead, there are too many bad software projects out there that stem from the fact that people try to program C++ as if it was "C with classes"

>However as a beginner you need *CONCEPTS*
Well, there are two types of beginners. There are those that don't know programming at all, and there are those that try to learn a new language and/or new paradigm for the first time.

>C++ is basically a language designed to micromanage your computer resources.
I agree, other languages are more suitable for absolute programming beginners.

>There are a lot of other paradigms in programming.
>I suggest looking at sosmething like SICP to broaden you view.
Anon, I read SICP when I was an undergrad. First of all, C++ is a multi-paradigm language like almost all new languages. If you want pure "OOP" languages or other one-paradigm languages, you need to use archaic languages such as Simula, Smalltalk, Objective-C, ALGOL etc.

Don't assume that I haven't read SICP just because I work with C++, that's just stupid. Also, don't assume that multi-paradigm is a bad thing and that you need to stick with single-paradigms... There is a reason why C++ improved so much with the C++11 version, and that is mainly because of all the functional features that were included from boost into the new standard.

You can program pure functional in C++ if you want, or even pure object-oriented. But you generally don't want to limit yourself in this way. Generally, you want to mix and match, use the best from both the imperative world and from the functional world.
>>
>>52596257
exactly why C++ is good for beginners.
You can start with writing C like applications, move on to C with classes and then learn about templates, lambda functions etc.
When you have learned to use the different paradigms within C++ you have a really broad perspective of programming in general.
>>
Any tips for an Android beginner programmer?
>>
>>52596366
Use Xamarin
>>
>>52596382
Are serious?
Not Native development?
>>
>>52596217
it doesnt make your code better. it makes you a better coder, because you have to remember how to do things without hints, you have to understand how the language works so it doesnt have a million runtime errors, and you have to learn to structure your code so it's easy to navigate and read and you don't need gimmick tools to get around a simple text file.

>>52596235
ofc i know that. anyone who uses a tool like vim or emacs and doesn't realize it's half a step away from a full IDE is an idiot. i still think you're a better programmer for not implementing plugins that have those functionality even if the editor is capable of it.

what i'm objecting to isn't IDEs in general but how easy they can make things for the user. i think they offload so much of the burden of understanding the language and the code that it turns into bad programming practice
>>
File: laugh-milk.gif (739 KB, 285x235) Image search: [Google]
laugh-milk.gif
739 KB, 285x235
>>52596257
>he thinks he knows C++ because he's used it as "C with classes"
>>
>>52596366
depends.
Do you work on android or do you make apps for android
>>
>>52596330

Thats a relief at least. Does it serve as any intro into further programming, like C or anything like that? Always been interested in programming, just never got around to doing any
>>
>>52596425
I think the second option.
>>
>>52596412
>what i'm objecting to isn't IDEs in general but how easy they can make things for the user.
Well, as someone who does programming for a living, that's exactly what I want!

>i think they offload so much of the burden of understanding the language and the code that it turns into bad programming practice
Maybe only in the very beginning, but sooner or later, even if you've used an IDE all along, you start picking up stuff here and there about the inner workings of your language of choice. It's impossible not to do so.

I mean, at some point you will have to try to debug a C program making the connection between what C codes creates this kind of assembly. Or, at some point you will try to make a multi-threaded program in Python and realize that it doesn't behave concurrent at all, and when you do more research you realize that this is because of the GIL. Or at some point, you will do a scope mistake in C++ and realize that objects only live within its declared scope.

It's impossible to not pick up more and more about stuff you do.
>>
>>52593083
Agreed. The most extreme example of course being code golf.
>>
>>52596412
>and you have to learn to structure your code so it's easy to navigate and read and you don't need gimmick tools to get around a simple text file.
You do know that at some point you need to make programs that are bigger than a single text file, right?

Easy code navigation is perfect for familiarising yourself with a completely new but large code base, for example. How would you even know where to look for the method implementation without it? Doing panic-like greps all over? Why not just use something like ctags and cscope?
>>
>>52596444
Not really. Html and CSS aren't really programming languages. If you want to get into programming start with something simple like Python on codeacademy
>>
>>52589317
this to be honest
>>
>>52589317
>what is function inlining
>implying stack frames are slow
Learn to turn on compiler optimization
>>
>>52593083
Short and readable code is not the same as obfuscated, cryptic shit.

>>52593135
>>52593174
>>52593199
>using C string functions
>doesn't consider different character encodings that use variable byte length characters such as unicode
Please stop using C
>>
>>52592801
>he can't build up autism
>>
>>52596644
My autism levels are over 9000 bitch
>>
>>52596655
>>52596644
And my doubles are even better than yours
>>
>>52592902
>4) learn javascript even though it sucks
plz no I don't want to
>>
>>52596513
>You do know that at some point you need to make programs that are bigger than a single text file, right?
of course i know that.

what i meant by "gimmick navigation tools" is shit like sublime's text map thing
>>
>>52596608
C string functions are safe if you don't make any assumption of "characters", and only deal with bytes until (and if) you have to display text.
>>
>>52598837
>copying a null-terminated string to a buffer
>not making any assumptions of characters
Pick one.

Null-terminated strings is not generic data, you're already making an assumption about the data by looking for the terminating in-bounds signal.
>>
>>52598195
any fancy "navigation" << two panes with text -- one you edit, another you refer to.

The problem with "IDE" and "advanced editors" is, all those little windows leave no space for the second text pane, so their users "need" navigation features.
>>
>>52598880
_strings_ are always null terminated. They may be in single-byte encoding or UTF-8 (so character may or may not be a byte), but they are still null-terminated.

"generic data" is not supposed to be manipulated with string functions because it's not strings. Well, duh.
>>
>>52598950
What about how ASCII is represented in UTF-16/32?

a (series of) null bytes followed by a single byte corresponding to the ASCII value (or the other way around if little endian).
>>
Don't do this:

if (condition == true) return true;
else return false;


Do this:

return condition;
>>
>>52584334
>Programming languages aren't like spoken languages. When you've learned one you've basically learned them all.

only *if* you first learn a language sufficiently low level. this only holds true for specific languages and is generally wrong.

each language has its own dialect that is preferred and just because you can cobble some bullshit together doesn't mean it is correct.
>>
>>52583776
this actually is true
>>
>people arguing about what language to use. Pick python if you have trouble with staying attentive. Pick C++ if you're ready for hard work.

Practice practice practice and practice.
>>
>>52599002
dunno lol
>>
>>52596332
C++ is more like C with templates for generics.
>>
>>52583776
>Go to 4chan.
>Learn to hate all your favorite subjects.
>>
>>52599513
Internet hate machine
>>
>>52583744
Learn business sense first. If you have technical and commercial skills, you have a foot in two areas that rarely meet, and you literally become irreplaceable.
>>
>>52590939
Okay. I'll get out now then. Thanks senpai!
>>
>>52589317
Programmers like you should be fired.

Computer time is cheap. Developer time is expensive. Optimize accordingly.
Thread replies: 160
Thread images: 15

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.