Live data from Hacker News

How to become a programmer, or the art of Googling well

okepi.wordpress.com

131–140 of 155 posts

Re: How to become a programmer, or the art of Googling well

#131
post #26

Earlier quoted context omitted.

Why is it a terrible advice?

Because programming != web programming, and sure as hell HTML/CSS is not programming. About javascript(vanilla js), nobody even wants touch it anymore. Almost anybody who interacts with javascript code does it with a 5 foot stick(coffescript, clojurescript), and/or behind huge frameworks that protects you from its perils. Something that is more usable and understandable in its barebones state like python makes more s…

>>Because programming != web programming

That's your personal opinion, and frankly, it reeks of elitism.

Re: How to become a programmer, or the art of Googling well

#132
Googling well is very helpful in filling in gaps in your knowledge that are widely known by others. For most (?) software engineering jobs, that's probably enough.

Writing some code that works, though, doesn't forward the state of the art. I was lucky enough to take AP computer science in high school. I remember arguing with the teacher when she criticized my code in front of the class. I said something along the lines of "Well, it runs and produces the right output!" She then lit into me, explaining that the structure of the code, its readability and maintainability were at least as important as its output. I've carried that lesson with me in the 19 years since, and had in reinforced multiple times over.

The art of "Googling well" won't teach you good abstraction and maintainability, and yet I would argue it is one difference between junior engineers and (good) senior engineers. We talk about learning all these frameworks, but that's not nearly as useful as developing the skills to create the next powerful abstraction to make a class of hard or time-consuming problems easier or faster to solve. You won't learn how to do that on Stack Overflow.

Re: How to become a programmer, or the art of Googling well

#133

Earlier quoted context omitted.

Because programming != web programming, and sure as hell HTML/CSS is not programming. About javascript(vanilla js), nobody even wants touch it anymore. Almost anybody who interacts with javascript code does it with a 5 foot stick(coffescript, clojurescript), and/or behind huge frameworks that protects you from its perils. Something that is more usable and understandable in its barebones state like python makes more s…

>>Because programming != web programming That's your personal opinion, and frankly, it reeks of elitism.

Um, that bit alone should be uncontroversial. Two sets are only equal if they contain precisely the same members. "There is no programming except for web programming" reeks of more elitism (in that it is more restrictive) than "there is programming that is not web programming". "Web programming is not programming" is another matter, but that's not actually what was said.

Re: How to become a programmer, or the art of Googling well

#134

Googling well is very helpful in filling in gaps in your knowledge that are widely known by others. For most (?) software engineering jobs, that's probably enough. Writing some code that works, though, doesn't forward the state of the art. I was lucky enough to take AP computer science in high school. I remember arguing with the teacher when she criticized my code in front of the class. I said something along the lin…

Do you have any thoughts on how a junior engineer can improve their ability to write maintainable code? This is the main problem I struggle with as a self-taught developer. I can write code that works for the most part thanks to googling all the things, but my projects tend to turn to spaghetti the longer I work on them, and are greek to me when I return to them in 6 months.

Part of the issue is that it's much more rewarding to add a new shiny feature than it is to refactor the existing mess, but another part is I'm not really sure what goes where. Most online courses targeted at inexperienced programmers teach x feature of y programming language, instead of practical software engineering... as a result I feel like I've learned how to build a fancy stained glass door for a house that has an unstable foundation.

I've often thought I'd like to hire a senior dev to sit with me and help me work through building an app the 'correct' way... but short of that I'd love to know of any books or web resources that would help.

Re: How to become a programmer, or the art of Googling well

#135

Googling well is very helpful in filling in gaps in your knowledge that are widely known by others. For most (?) software engineering jobs, that's probably enough. Writing some code that works, though, doesn't forward the state of the art. I was lucky enough to take AP computer science in high school. I remember arguing with the teacher when she criticized my code in front of the class. I said something along the lin…

Do you have any thoughts on how a junior engineer can improve their ability to write maintainable code? This is the main problem I struggle with as a self-taught developer. I can write code that works for the most part thanks to googling all the things, but my projects tend to turn to spaghetti the longer I work on them, and are greek to me when I return to them in 6 months. Part of the issue is that it's much more r…

> Do you have any thoughts on how a junior engineer can improve their ability to write maintainable code?

Think of your code like an essay. Write comments on the motivation for decisions you make, not just what the codes does. Think of the exercise not as trying to just produce writing code, but to make the next person reading the code feel like they were with you the whole way, making decisions together, working out problems on a whiteboard.

While doing this, don't be afraid of honesty, don't be afraid of verbosity, and always have empathy for the next person reading your code.

Re: How to become a programmer, or the art of Googling well

#136

Googling well is very helpful in filling in gaps in your knowledge that are widely known by others. For most (?) software engineering jobs, that's probably enough. Writing some code that works, though, doesn't forward the state of the art. I was lucky enough to take AP computer science in high school. I remember arguing with the teacher when she criticized my code in front of the class. I said something along the lin…

Do you have any thoughts on how a junior engineer can improve their ability to write maintainable code? This is the main problem I struggle with as a self-taught developer. I can write code that works for the most part thanks to googling all the things, but my projects tend to turn to spaghetti the longer I work on them, and are greek to me when I return to them in 6 months. Part of the issue is that it's much more r…

I was also self-taught and it took a good 2 years for me to get to the point to be able to write maintainable code. Here are the lessons I learned, in no particular order:

1.) Read your code after you write it. I do this via git diff --cached. It's amazing how many bugs you catch this way. Be critical of variable names, code layout or confusion, lack of documentation. It's basically doing your own code review. Is it documented? Is it tested? Does it make sense logically? Is it easy to read?

2.) Document stuff. Fluff documentation is even fine to start with, you'll eventually learn to separate the important documentation from fluff. Ultimately you need to get to the point of the "why" code does what it does, not the "what" it does. "What" it does should be evident by the code itself and the variable names/etc.

3.) Plan ahead. I don't mean pseudo-code per-se...more thinking or writing down how code will fit together. Mind mapping is great for this, particularly with a white board or tile. I have a Galaxy Note that I bought partially for this purpose and use Papyrus for it now. Basically, how do the abstractions and parts fit together? Is it logical? Not everything requires a whiteboard, but a few minutes of thinking ahead can help spaghetti code a lot.

4.) Learn different programming paradigms. OO style can quickly become un-maintainable even to pros. I suggest learning functional programming in a language like Scheme/Clojure, Lisp, or Erlang. I now pick up a new language every year in different paradigms...not so much to learn the language or to brag, but to learn different way things can be architected, and the way other languages do things.

5.) Do refactor. Outside of budget constraints, don't be afraid to rewrite code that doesn't seem to flow properly.

You mentioned sitting with a senior dev...that was pretty huge for me too, even in limited times. (I'm not sure I'd pay for it, but it did cut the learning curve down quite a bit) Having someone do code reviews of your code that knows what they're doing and invests time in it is helpful too. I've found though that not every Senior dev is good at reviewing code or teaching...

Sorry, I don't have any actual resources for this other than well structured code like Django (mostly) or sqlite. I now have a B.S. in CS and I don't really think they teach this well in schools either. Patterns will only get you so far in OO too...generally, trying new languages, reading code, and refactoring has made the largest impact on me.

Re: How to become a programmer, or the art of Googling well

#137

Googling well is very helpful in filling in gaps in your knowledge that are widely known by others. For most (?) software engineering jobs, that's probably enough. Writing some code that works, though, doesn't forward the state of the art. I was lucky enough to take AP computer science in high school. I remember arguing with the teacher when she criticized my code in front of the class. I said something along the lin…

Do you have any thoughts on how a junior engineer can improve their ability to write maintainable code? This is the main problem I struggle with as a self-taught developer. I can write code that works for the most part thanks to googling all the things, but my projects tend to turn to spaghetti the longer I work on them, and are greek to me when I return to them in 6 months. Part of the issue is that it's much more r…

I'm far from what I would call a senior engineer (or a engineer at all), but the times I've written the most readable and maintainable code were when I write first what the program should do in comment form and then completed it with the corresponding code.

This way you force yourself to think outside your programming language and also forces you to write the corresponding comments.

I think this has a name as a methodology but cant remember it.

Re: How to become a programmer, or the art of Googling well

#138

Earlier quoted context omitted.

France here - starting as a student and stepping into the university library, it took me 30 seconds to realize that everything interesting was written in English and not being able to proficiently ingurgitate vast amount of it was going to be a problem. I just shunt French as written input for the next 5 years. When the valley called for a job, I was ready. Pasteur said "Chance favors the prepared mind" - he was rela…

I wonder about the mind/minds I should say Chance favors those with a prepared mind or Chance favors only favor people with prepared minds, perhaps minds is plural in Spanish an singular in English and this is reasoning? Can anyone confirm this reasoning or I am completely confuse? Edited: Gooling I found people with heads are smarter, so here they use the plural. So why mind and not minds. http://gnosticwarrior.com/…

"Chance favors those with a prepared mind" is grammatically correct and sounds just fine, it's just not as pithy as the original. You could also say "Chance favors prepared minds".

Re: How to become a programmer, or the art of Googling well

#139

Earlier quoted context omitted.

>>Because programming != web programming That's your personal opinion, and frankly, it reeks of elitism.

Um, that bit alone should be uncontroversial. Two sets are only equal if they contain precisely the same members. "There is no programming except for web programming" reeks of more elitism (in that it is more restrictive) than "there is programming that is not web programming". "Web programming is not programming" is another matter, but that's not actually what was said.

>>"Web programming is not programming" is another matter, but that's not actually what was said.

Actually, it was. If you read the rest of the parent's comment, he completes that sentence with: "...and sure as hell HTML/CSS is not programming."

So it's pretty clear from the way the sentence is written that the parent has clearly established some sort of hierarchy in his mind, and what he actually meant was, "web programming is not real programming."

Re: How to become a programmer, or the art of Googling well

#140

Googling well is very helpful in filling in gaps in your knowledge that are widely known by others. For most (?) software engineering jobs, that's probably enough. Writing some code that works, though, doesn't forward the state of the art. I was lucky enough to take AP computer science in high school. I remember arguing with the teacher when she criticized my code in front of the class. I said something along the lin…

Do you have any thoughts on how a junior engineer can improve their ability to write maintainable code? This is the main problem I struggle with as a self-taught developer. I can write code that works for the most part thanks to googling all the things, but my projects tend to turn to spaghetti the longer I work on them, and are greek to me when I return to them in 6 months. Part of the issue is that it's much more r…

Read other people's code. There's a world of high quality (and not so high quality!) code out there - pick a reasonably simple open source app and read it's code. Think about how it's put together: Why did the programmer chose to cut the problem space into those particular pieces? How do those pieces interact? Is the API obvious, or completely opaque? Is it completely batshit internally? (I've seen some batshit code in my time. I even wrote some of it.) How could it be improved?

Mentoring with a senior dev is a great idea if you can find someone willing to sit down with you, but just doing the work of going through real world code is well worth your time IMO.

Post reply on HN