4 ms·
or you can take a algorithm class and become one within 2 years, as somebody once stated ;)
by morphir 17y ago
or you can take a algorithm class and become one within 2 years, as somebody once stated ;)
- djcapelis 17y agoThere's more to good code than algorithms. I really don't understand why some people in the HN community continually overstate the importance of algorithms. This is about the last place on the internet you need to go convincing people algorithms are cool. Yes, algorithms are great. They are not everything, however. Taking an algorithms class will only elevate you above some very basic mistakes. It will not make you an expert. Also not all algorithms professors are Knuth. I've seen the code of the ones who think that study of algorithms is sufficient to know programming and it's not pretty.
- morphir 17y agoWho said that algorithms are everything? No, of course they are not. In C-languages you have about 50% memory management, then you have code architecture. But algorithms are the very heart of programming, and the most important topic. Look, if you have the algorithm to carry out a task, then its just a question whether you have the tools to accomplish it, and if you know your tools to do it. The latter could be the equivalent of knowing your programming language.
- djcapelis 17y agoA knowledge of algorithms doesn't teach you to pick the right problems to solve. Once you get it down into problems like "sort this list" the code practically writes itself and the correct algorithms are simple to determine. Figuring out how to take a complex problem and break it down into problems that you then can throw your algorithm knowledge at is a whole art that takes years of study. A firm grasp of algorithms is essential but not sufficient and it can only help inform your decisions, not provide firm answers. Picking the right problems is the heart of programming. Figuring out which algorithm to throw at a sub-problem is the heart of contract work.
- morphir 17y ago"A knowledge of algorithms doesn't teach you to pick the right problems to solve." That is true. To create a application, one needs a Use Case. A Use Case will provide the most abstract solution to what the app will be doing. Then you can take the top down design approach, by dividing the Use Case into a several abstract sub problems. That is known as code architecture and belongs to System Engineering. The System Engineer needs a domain-expert help to identify what problems that needs to be solved. Then.. Programming is carrying out those abstract sub-problems (interfaces) to become a concrete solution using a specific programming language. To complete such a task, one needs a person that knows his/hers algorithms design techniques, sorting, searching, string processing, graph problems, combinatorial problems, geometric problems and numerical problems. And lastly, the analysis of the respective algorithms. Once you know what to solve, its just a matter of being able to carry out the task. I think you might have confused the programmers job with the job of actually creating the entire software - which in general terms is non-sense. To sum up: The software engineer (the project lead) takes care of identifying the sub-problems, after creating the Use Case with the domain expert (often the customer). The programmer solves those sub-problems bottoms up, by focusing on creating the atomic parts as efficient as possible.
- plinkplonk 17y ago"The software engineer (the project lead) takes care of identifying the sub-problems, after creating the Use Case with the domain expert (often the customer). The programmer solves those sub-problems bottoms up, by focusing on creating the atomic parts as efficient as possible." This is how yucky enterprise monstrosities get built. The "software engineer"/programmer division is nonsensical and sounds like something one would find in Wipro or Accenture, not so much at (say) Google or Facebook. "I think you might have confused the programmers job with the job of actually creating the entire software - which in general terms is nonsense." :-D . The term you are looking for (since you seem to be fond of labels to sratify coders), for people who just implement whatever their "lead" tells them to is "code monkey".
- morphir 17y ago
- gnosis 17y agoI fully agree with this. Far more important to me than a great algorithm is readable, maintainable, and well-structured code. If your algorithms suck but your code is readable, maintainable, and well-structured, it'll be a lot easier to find someone who has a better knowledge of algorithms to come fix it. While, if your code is unreadable, unmaintainable, and/or poorly structured but has great algorithms, you'll have a much harder time finding someone to fix it (or even fixing it yourself). Here's what Rob Pike had to say on the role of algorithms in programming (from the recent HN submission on the Basics of Unix Philosophy http://www.faqs.org/docs/artu/ch01s06.html http://www.faqs.org/docs/artu/ch01s06.html ) "Rule 3. Fancy algorithms are slow when n is small, and n is usually small. Fancy algorithms have big constants. Until you know that n is frequently going to be big, don't get fancy. (Even if n does get big, use Rule 2 first.) Rule 4. Fancy algorithms are buggier than simple ones, and they're much harder to implement. Use simple algorithms as well as simple data structures. Rule 5. Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming."
- nostrademons 17y agoI don't think it works quite like that. When I got my first programming job, straight out of high school, I finished tasks in 2 days that took the other programmers there 4 months. I figured that if I was that much faster than them, I ought to be able to become a world-class programmer in just a couple years (or more accurately, I thought I could become a world-class physicist in my 4 years of college and then a world-class programmer in the 2 years afterwards). So I resolved to take all the shortcuts I could. I'd read all the classic books in the field and learn from those with more experience than me. I'd take internships with experienced, accomplished programmers and pick their brains for everything I could. I'd take on volunteer coding tasks so I could get some experience building things on my own. I'd cherry-pick all the tough courses at college so I got the best part of a CS degree without having to sit through stuff I already knew. I did all that. I've read all the classic CS books - GoF patterns, Mythical Man Month, Extreme Programming stuff, Pragmatic Programmer, Knuth, SICP, TAPL, Dragon Book, On Lisp, etc. I've worked with programmers that wrote large chunks of curses, Rogue, vi, Jini, JavaSpaces, HotSpot, Gallery, Stratus, Equalogic, DEC compilers, Python, Google, and a bunch of other projects they don't brag about. I wrote Amherst's course-evaluation system, and rewrote the software for a 100k-user site, and wrote one of the front-page hits for [haskell tutorial]. I have that CS degree, and aced the algorithms class of which you speak, and took compiler design and OS and computer graphics too. It's been 9.5 years since that first programming job, and it still feels like I have a really long way to go before I'm actually a world-class programmer. The part I didn't realize, in my youthful arrogance, was that I was comparing myself to the wrong people. When Norvig tells you how to become a programmer in 10 years, he's assuming you're already taking all the shortcuts you can. It still takes 10 years. Most of the people you'll meet straight out of high school, or in most colleges, or in random companies, will never become programmers in the sense that Norvig's talking about. Eventually they'll give up trying, and start grumbling on Reddit about how the software industry is mostly boring cubicle farms where they push around Enterprise JavaBeans and never use the algorithms that they learned in college.
- strlen 17y ago> It's been 9.5 years since that first programming job, and it still feels like I have a really long way to go before I'm actually a world-class programmer. It's interesting how as we get more experience, we become a more aware of the shortcomings of our knowledge and skill. It's been ~9.5 years for me as well (took an systems/ops job that involved a great deal of programming in Nov 2000 as a junior in HS, was "writing code" before that) and I'm only now learning how much more there is for me to learn.
- strlen 17y agoYou certainly should take an algorithm class (better yet, two) and/or work through -- including the homework problems -- two to three algorithm text books (I highly suggest Knuth's TAOCP, CLRS and Steve Kiena's Algorithm Design Manual). However, after that, you will: * Become more aware of the shortcomings of your knowledge of algorithms (both directly -- algorithms which you don't yet know/understand and indirectly -- algorithms which don't yet exist). That's a huge benefit. * Learn a bit the analysis of algorithms and how to prove an algorithm correct * Learn a bit about algorithm design * Most importantly, you will learn about classes of problems, classes of algorithms and several implementations of these classes of algorithms. You will be able to reason from "real world problem" to "falls under these classes of problems" to "solvable by these algorithms" and then apply an instance of an algorithm to the problem. You will not become an algorist (that would take its own ten years), nor will you become a programmer. It will certainly help you become a programmer, but there's more to programming than algorithms. That being said, there's a path to be crossed. At one stage one thinks that writing graphical demos in assembly or (depending on the decade) web apps backed by databases is the "golden nugget" of programming. Then there's the road through learning algorithms, data structures and non-imperative programming languages, which is culminates in writing your own compiler (or any other project which requires a great deal of coding and puts together data structures, algorithms, hardware/OS knowledge, theoretical CS knowledge e.g. automata and language theory). There's a lot more that follows until one becomes a great programmer, but I can't tell you what those "milestones" are, as I am not there yet.
- EricBurnett 17y agoHe addresses the topic of "book learning" explicitly in the post. If you want, put in four years at a college (or more at a graduate school). This will give you access to some jobs that require credentials, and it will give you a deeper understanding of the field, but if you don't enjoy school, you can (with some dedication) get similar experience on the job. In any case, book learning alone won't be enough. "Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter" says Eric Raymond, author of The New Hacker's Dictionary. One of the best programmers I ever hired had only a High School degree; he's produced a lot of great software, has his own news group, and made enough in stock options to buy his own nightclub.
- keefe 17y agoI focused on algorithms in grad school and I've had some kind of programming job for (fuck) 12 years now, so I guess I'm nearly in programming puberty. I believe algorithms touches on something fundamental and provides a foundation that cannot be avoided. However, a house is more than the foundations. Algorithms does not touch on any engineering issues like software maintenance, productively achieving a goal (you can spend your life on interesting tangents) or (generally) performance of systems as a whole.