O'Reilly Site Lists 165 Things Every Programmer Should Know (oreilly.com) 234
97 Things Every Programmer Should Know was published seven years ago by O'Reilly Media, and was described as "pearls of wisdom for programmers collected from leading practitioners." Today an anonymous reader writes:
All 97 are available online for free (and licensed under a Creative Commons Attribution 3), including an essay by "Uncle Bob" on taking personal responsibility and "Unix Tools Are Your Friend" by Athens-based professor Diomidis Spinellis, who writes that the Unix tool chest can be more useful than an IDE.
But the book's official site is also still accepting new submissions, and now points to 68 additional "edited contributions" (plus another seven "contributions in progress"), including "Be Stupid and Lazy" by Swiss-based Java programmer Mario Fusco, and "Decouple That UI" by tech trainer George Brooke.
"There is no overarching narrative," writes the site's editor Kevlin Henney (who also wrote the original book). "The collection is intended simply to contain multiple and varied perspectives on what it is that contributors to the project feel programmers should know...anything from code-focused advice to culture, from algorithm usage to agile thinking, from implementation know-how to professionalism, from style to substance..."
But the book's official site is also still accepting new submissions, and now points to 68 additional "edited contributions" (plus another seven "contributions in progress"), including "Be Stupid and Lazy" by Swiss-based Java programmer Mario Fusco, and "Decouple That UI" by tech trainer George Brooke.
"There is no overarching narrative," writes the site's editor Kevlin Henney (who also wrote the original book). "The collection is intended simply to contain multiple and varied perspectives on what it is that contributors to the project feel programmers should know...anything from code-focused advice to culture, from algorithm usage to agile thinking, from implementation know-how to professionalism, from style to substance..."
Lots of links to articles, phfft (Score:5, Interesting)
That said, I trust O'Reilly to produce quality books. One fail (Make) in maybe 20 books I own from them is a good record.
/ The Gnu make manual is the best Make doc I've seen.
Re:Lots of links to articles, phfft (Score:5, Funny)
What ? This is slashdot! Since when do we read things before disagreeing with them?!
Re:Lots of links to articles, phfft (Score:4, Funny)
I don't even know what the hell you guys are talking about, but I disagree!
Re: (Score:2)
Exactly. My complaint is it's going to take me forever to come up with 165 well-thought-out snarky responses to all of these things.
Re: (Score:2)
You're in luck. If you actually open the link, there seem to only be 97 of them. Maybe a few more routine actions will get the list down to something more tractable. Maybe 3 or so.
Re:Lots of links to articles, phfft (Score:5, Insightful)
Didn't take me long to start disagreeing with them. This one [oreilly.com].
I'm sorry, but a program that's thousands of methods and small classes is not clearer than a program with fewer, larger, structures. Yes, write code for Humans, not machines, I agree. BUT remember your other programmers want to understand your program - not any one individual method - so making each method simple only moves the complexity into the interrelationships between methods, something considerably harder to understand.
(The real failures when other people edit my code usually come in not understanding how classes inter-relate and the layers of the program - the architecture if you will. And at the moment, the only real way of communicating this? Comments describing the architecture.)
And, do comment your code - not 'as little as possible', but not 'what's obvious from the code'. Remember what's obvious to you might not be obvious to someone else -- write code for humans, not machines. I'm really REALLY not sure that creating another class to hold four parameters for one method is any clearer than just those parameters - especially since I work in languages that support named parameters anyway (a much neater solution)).
The dead giveaway that this person is full of it is their lack of justification - explain to me WHY the "rule" exists..
(NB: This is really a collection of 97 micro-essays -- it has, actually, 97 authors - so each author is different.)
Comment removed (Score:5, Interesting)
Re: (Score:2, Insightful)
That makes sense if the inner loop is quite large, but not so much if it is small, or the inner and outer loop are very similar (e.g. obviously just looping over a multidimensional array). It doesn't take much for this idea to make code very difficult to read and maintain. I had to take over some code that automated some equipment and at some point we changed the equipment such that a default setting was no longer appropriate. It took two people way too much time to dig for where that default value came
Re: (Score:2)
Exactly. At the end of the day, legalistically following most "rules" will result in poor code. A good software developer understands when it makes sense to have a longer function or shorter one. They understand when and how to break functionality out. They understand when shorter code is easier to maintain and when longer code is easier to maintain.
It's hard to point to any particular rule and say that it ALWAYS holds true, though it's easy for us to cite examples of rules that should've been followed in p
Re: (Score:2)
I'm not sure if we are or aren't disagreeing. The point I was trying to make is that we shouldn't unquestioningly follow rules for their own sake. Instead, we should follow them inasmuch as they help us to write more maintainable code. At the end of the day, we want maintainable, well-designed code, not a mess of code in a single function, nor a mess of code scattered across too many functions.
As a general statement, I run into more developers who would benefit from the "keep functions short" rule, just bec
Re: (Score:2)
What the author was implying is that you should take relatively straightforward components of a function and break them out as their own sub-functions with a very descriptive name, especially the inner workings of nested loops. If you take the inner loop and replace it with a function call that describes what the inner loop does, then your outer loop actually gets much easier to read, as it does not have the distraction of the gritty details of how the inner loop performs its duties. With properly written sub-functions, you can simply read the name and understand what it is doing without having to actually read the function at all. I have personally done code reviews on code that has been re-factored in this fashion, and the readability of the code is night and day.
I disagree. Commenting a code block accomplishes the same thing and "distractions" reasoning for taking up a few more lines on a page is of unconvincing value and probably dangerous. What IDE does not allow you to collapse by scope? For all you know someone may discover an important side-effect by actually noticing structure of intervening code. When you replace comments with function names then function names also risk becoming as stale and dangerous to believe as comments.
My personal view organizing
Re: (Score:2)
If you take the inner loop and replace it with a function call that describes what the inner loop does, then your outer loop actually gets much easier to read...
Nice idea when things happen to factor that way. But often they do not, and the additional glue you need to factor out the inner loop adds more obfuscation than it removes. The takeaway is, just don't be mindless about factoring techniques.
Re: (Score:2)
Re: (Score:2)
You don't understand the difference between what and how, so you're opinion is worth less than nothing. You actually owe people for the pain of reading your comment.
Re: (Score:2)
You don't understand the difference between what a function claims to attempt to do versus what it actually achieves. You have no business in IT.
int returnRandomInt(int max)
{
return 4;
}
Re: (Score:2)
Yes, that code is a bug.
Guess what real programmers do at least 60% of the time?
Fix bugs.
Any technique that obscures bugs is detrimental.
Re: (Score:2)
Hey, that four was generated by a fair die roll and is guaranteed to be random!
Re: (Score:3)
I'm sorry, but a program that's thousands of methods and small classes is not clearer than a program with fewer, larger, structures. Yes, write code for Humans, not machines, I agree. BUT remember your other programmers want to understand your program - not any one individual method - so making each method simple only moves the complexity into the interrelationships between methods, something considerably harder to understand.
Actually, I agree with the author on this one, but the title is wrong. It should be something more like: "Write your code under the assumption that dozens of mediocre programmers will be eventually responsible for maintaining it."
This "thousands of 15 line methods and small classes" approach is the only way that we know of, so far, to scale up codebase to dozens or even thousands of mediocre programmers. It sucks, but really good programmers are hard to find.
Re: (Score:2)
That sounds retarded. I think a balanced approach is DRY. Do I ever find myself writing the same set of instructions twice? If so, make it function. Is it something that only gets written once? Inline it.
Re: (Score:2)
I don't disagree with that one.
Picture a program as a huge collection of LEGO bricks and pieces, and understanding the program implies understanding how the LEGO parts are being used.
What is easier to understand, one huge box full of LEGO bricks along with a very long instruction manual explaining all of the contents, or having the LEGO bricks neatly divided into smaller packages along with shorter instructions that focus on the contents of each individual package?
Of course, the big advantage of the latter
Re: (Score:2)
And at the moment, the only real way of communicating this? Comments describing the architecture.
A few years back I started incorporating UML diagrams [smartdraw.com] into my design process. So before I start coding I draw out the architecture of the program, and this becomes part of the documentation. I find this useful for my own planning purposes to prevent constant refactoring, and if I need to explain the program to someone else, a picture is worth a thousand words.
Re: (Score:2)
This works especially well in languages where you can have a function whose definition is within the scope of a function. Then all the functions are guaranteed to be together in the source, and with their containment relationships obvious to the human reader. If one changes an inner function's functioning, one only needs to check in one place--the outer function--for how this affects things.
Re: (Score:2)
Neither extreme is a panacea, but modern compilers are good at inlining, so there's little performance difference between the two and small functions do make sense when each is an individual step in the algorithm. The function that calls a number of small functions then reads like an abstract description of the algorithm that you're implementing and people only need to see the details if they want to. What you really want is a literate programming system where you can embed default detail levels into the
Re: (Score:2)
You write 10 small functions, each a small non-trivial piece of code. You write one small function that binds them together. Next person after you needs to hunt around 11 files in the code to determine how that works and why it doesn't work to specs, instead of having the whole "device" right in 2-3 screens. Never mind if that's 10 + 1. What if it's 1000+100+10+1?
Or you have 6 different places where given piece of data is used, and it's used in 6 different slightly different variants. So you create these 6
Re: (Score:3)
You write 10 small functions and then have another function that ties them all together. Problem solved, your system isn't any more complicated
Yes, it is. It's more complicated by now having 11 parts instead of one, and 10 extra relationships between them.
None of the rest of your claims follow automatically just from having more, smaller functions. Indeed, the point several of us are trying to make is that exactly the opposite may be true: breaking everything down into very small functions can make code harder to understand. While the individual functions are simpler, the number of potential relationships between them grows exponentially, and thos
Re:Lots of links to articles, phfft (Score:4, Insightful)
Indeed, the point several of us are trying to make is that exactly the opposite may be true: breaking everything down into very small functions
That is a strawman. Nobody said very small. They simply should be small enough, that is all.
the number of potential relationships between them grows exponentially, and those relationships may not be as transparent once you've broken everything down into tiny pieces.
Then you are doing it wrong.
By "definition" a function only works their arguments and returns a result. Usually, if it is a method in a class, it does not even manipulate the attributes of its associated object.
The only relation functions have to each other is their call hierarchy, which is easy to figure and in an IDE trivial. Worst case use the debugger.
Re: (Score:2)
That is a strawman. Nobody said very small. They simply should be small enough, that is all.
Unfortunately, that's not true. Plenty of people do openly and sometimes rather strongly advocate extremely short functions, including Robert Martin, whose book was mentioned back up the thread. Even the original point that was linked at the start of this thread suggests an upper limit of 15 lines, which is far too short for a lot of useful algorithms.
By "definition" a function only works their arguments and returns a result.
In a pure functional language, that is true. Almost anywhere else, it is not, because functions can have side effects, often including interacting with variou
Re: (Score:2)
http://programmer.97things.ore... [oreilly.com]
"Learn the Platform"
http://programmer.97things.ore... [oreilly.com]
Re:Lots of links to articles, phfft (Score:5, Insightful)
Anyone wanna summarize the list so I don't have to read 160 articles to see if I agree/disagree with them?
1) Don't do stupid shit.
2) Think ahead.
3) Don't reinvent the wheel.
Re: (Score:2)
Don't do stupid shit.
I am sure this is a sound advice that actually helps people improve their behaviour. </s>
Re: (Score:2)
Don't do stupid shit.
I am sure this is a sound advice that actually helps people improve their behaviour. </s>
It's helped me and countless others, but it won't help the terminally stupid.
Re:Lots of links to articles, phfft (Score:4, Funny)
Anyone wanna summarize the list so I don't have to read 160 articles to see if I agree/disagree with them?
1. THE ROBOTS ARE COMING -- find a different job.
Re: (Score:2)
Programmer is the safest job. Somebody has to program the robots.
When the robots learn to program themselves, well, then we have reached the end of human civilization.
Re: (Score:2)
Oh, except for:
72. Reinvent the Wheel Often by Jason P Sage
Beware the 'catchy' titles. This one happens to sum up to "if you reuse some code, you won't have intimate knowledge of it and will just consider it a black box". It's not made especially clear why that's such a bad thing though.
Pair Programming (Score:4, Informative)
Not sure "pair programming" qualifies as something every programmer should know. Though perhaps every programmer should know that a few programmers are rather fanatical about it.
Re: (Score:2)
Not sure "pair programming" qualifies as something every programmer should know. Though perhaps every programmer should know that a few programmers are rather fanatical about it.
Knowing it doesn't mean you need to practise it.
The list is basically a giant list of suggestions and perspectives, not every one is applicable to every situation, but knowing the list means you have a much better chance of knowing the ones that are applicable to your situation.
Re:Pair Programming (Score:4, Funny)
Pair programming sounds horrible and I'm glad I don't have someone staring at my screen while I'm trying to slack off and read Slashdot.
Re: (Score:2, Insightful)
It's called, interrupting job tasks to prevent boredom and burn-out.
That's gaining external perspectives on important issues; which is the very point of 97 Things Every Programmer Should Know.
Re: (Score:3)
Re:Pair Programming (Score:4, Insightful)
Unix Tools vs IDE (Score:3)
Depends which do you think you can recreate faster as you need them.
Small Unix Tools using the IDE
or the Large IDE using small Unix tools.
Stupid and Lazy (Score:3)
"Be Stupid and Lazy" sounds a lot like Lary Wall's "Three Great Virtues of a Programmer: Laziness, Impatience, and Hubris" http://wiki.c2.com/?LazinessIm... [c2.com]
Of course, maybe the "Be Stupid and Lazy" author was just being lazy :)
Good book for getting back into Java... (Score:4, Interesting)
This week I had to install Ant to automate some Python programming tasks. Of course, Ant requires Java. I haven't touched Java since I graduated from community college 10 years with an A.S. degree in computer programming and had to learn all flavors of Java because the CIS department couldn't afford to renew the Microsoft site license for Visual Studio, and, when the site license got renewed, none of the computers could run VS .NET. I really wanted to learn C++ instead of Java, but industry surveys showed that local employers wanted VS C++ and not GNU C++.
Anyway, Ant renewed my interest in Java. Any good O'Reilly book to get back into that language?
Re: (Score:2)
Why the hell did you have to use Ant of all things to automate some Python programming tasks?!
Needed something to automate the generation (Pelican), archiving (zip) and publishing (rsync) of my static websites.
Why didn't you just use Python?!
Python automation tools don't work with Python 3 and/or imposed a file structure that doesn't work with the Pelican static website generator. All Ant required was a build.xml file to do what I wanted it to do. That was faster than creating a Python script to do the same thing.
Re: (Score:2)
Use make.
Make looks too arcane to learn. Ant XML was more straight forward to learn. Not surprise there since I wrote an XML parser in Java for my independent programming project prior to graduation.
Re: (Score:3)
Re: (Score:2)
XML is extremely straightforward and regular. It's just that you end up with a 20:1 ratio of metadata:data.
Make's syntax is correctly described as arcane. Lots of special characters and strings, terse and difficult for people unfamiliar with it to parse. Well, okay, it's not arcane in the literal sense, it's well documented, but the history of the syntax and the way it has been hacked and evolved over the decades is.
Re: (Score:2)
But you've gotta admit make IS arcane if you want to use it for anything more complex than configure-build-install.
Re: (Score:2)
Did you really just say that make is arcane, but XML is straightforward?
Yes. I wrote an XML parser (reader) for a college class. Any idiot can write XML tags. Parsing XML tags without the assistance of any XML APIs made for a challenging project. The Ant build.xml file isn't that complicated to learn.
Re: (Score:2)
Why not just use the fucking built-in Fabric or Make automation?
Fabric is compatible with Python 2: "Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks."
http://www.fabfile.org/ [fabfile.org]
Make will run under Cygwin but not under PowerShell on Windows.
Jesus christ, talk about reinventing the wheel and not bothering to learn your toolset.
It took 30 minutes to create the Ant build.xml file and five minutes to modify the build.properites file for a half dozen websites. That's not reinventing the wheel. It's using the right tool for the job.
Re: (Score:2)
Fabric3 is a drop-in replacement for fabric which is compatible with pythons >= 2.7.
Fabric3 is a Java container.
http://fabric3.org/ [fabric3.org]
If you have the ability to blast the JDK and ANT out onto your servers, you have the ability to install a supported python 2 version.
The only thing I blast to my servers are static web files. I have Python 3, Java and Ant installed on my laptop.
No, that's wrapping a utility in your own custom scripting, which means that you have to support it yourself, and you're saddled with the constant ongoing maintenance and upgrade cycle.
Which is what I'm already doing for my websites.
Re: (Score:2)
No, you dumb twat, the fabric3 under discussion is a python [python.org] module [github.com], as the 'pip3 install fabric3' command would have suggested to you, if you weren't a half-wit with no knowledge of python, and no legitimate reason to be near the business end of a computer.
I find your lack of sense of humor disturbing. Turn in your geek creds. Don't let the door hit your ass on the way out.
You've INVENTED a need for a new tool by specifying requirements that aren't requirements.
I didn't invent anything. I write Python 3 code. My codebase is Python 3. I haven't done anything Python 2 coding in over two years. Since this is MY LAPTOP and MY WEBSITES, it's MY REQUIREMENTS that have to be satisfied.
Writing a bunch of one-off support scripts that are required to achieve your goal is taking focus away from the goal, and making your environment more complex, harder to debug, and harder to maintain.
I wrote the Ant build.xml in 30 minutes. It took five minutes to modify the build.properties files for a half-dozen different websites. If I type ant, my website is generat
Re: (Score:2)
C++ is C++. You can learn the majority of the language using any compiler.
True. If the dean had his way, he would have taught C/C++ using Linux. But the administration said no because the surveys of local Silicon Valley companies reported that they wanted graduates who knew Visual Studio C++ — or Java.
You should never use the special Sun classes so really there's only one flavor of Java.
"All flavors of Java" is my joke regarding the IDEs available for Sun Java after the dot com bust: Notepad, Eclipse or Net Beans.
I don't know what you thought you learned.
Programming. Not software development, software design or computer science. Six years as a professional video game tester and five years of program
Re: (Score:2)
If you need a book to get "back into" a language, you're not really a programmer.
Java changed quite a bit since I last used the language 10+ years ago. Real programmers aren't afraid to ask for help or look up reference materials.
Community college, huh?
Paid for with a $3,000 tax credit that George W. signed into law after 9/11.
Deliberate Practice (Score:2)
Do Lots of Deliberate Practice ... "It takes elite performers a minimum of 10,000 hours of deliberate focused practice to become experts."
The quote about deliberate practice is taken out of context.
1) It is said it typically takes 10,000 of deliberate practice to become "elite", but it can take as few as 100 hours for those "naturally" good at something
2) This mostly applies to professions where practice matters, like playing an instrument. As a profession becomes less about muscle memory and more about thinking, practice becomes less useful.
Becoming an elite in a purely intellectual profession can require virtually zero practice. Some p
Re: (Score:2)
Rule of thumb, don't write any code until you understand the problem and have thought of a good solution.
Are you suggesting people think *before* they code. How Dare You._howdareyou_.
Seriously though sometimes I write a prototype knowing I'm going to throw 90% of the code away, I just want to know where the hard problems will be before I invest too much in anything else. Sometimes you end up with a few gem ideas that you can refine.
Re: (Score:2)
One of my rules of thumb is "You can't know why your code doesn't work unless you first know how it works.". 80
Re: (Score:2)
Sometimes you can even get away with just knowing how the code should NOT work to fix a bug.
I wish I was so lucky. When ever I have to deal with other software engineers, they only define the overly simplistic happy paths. Failure paths? What are those? That really grinds my gears. I always rub their nose in it when I ask them if that is how it should work, only to find out they did not think of that situation. I just tell them it is undefined, so it is not a bug. "Fixing" the situation is now a feature request.
I should refine my statement. "You cannot know how your code does not work until you
Picking one at random (Score:5, Informative)
A professional programmer is someone who gets paid to do the job of programming.
Sorry, bud, but professionals take responsibility for what they're paid to take responsibility for; no more and no less. And push responsibility off when appropriate too, like when their boss commits them to a schedule they can't make without compromising workmanship.
Hell, yeah, they do. What do you think a resident is? Maybe the author is confused because after residency, many doctors are owners of their own practice, at which point they are not just professionals but business owners. Me, I draw a salary. If my training is going to benefit The Company, it's on The Company to provide it.
Again with the confusion between a professional and someone with independent authority. My code goes out when the boss says it goes out, ready or not.
Obviously not familiar with life in a corporation. Managers and leads take responsibility for the output of the whole team, when that output is good. When things are fucked up, THEN the programmers get the responsibility. Shit flows downhill, credit is taken upward.
Professionals fix those bugs, and only those bugs, they're being paid to fix. The rest can sit in the issue tracker until doomsday. Ain't no point in getting the boss riled up over spending time fixing a minor floating point division error when you're supposed to be working on the shiny new feature.
A professional rushes when being paid to rush. A professional keeps the code clean when practical under the constraints of the job. If that means we're getting the code out on time only with a bunch of copypasta and a goto or two, that's how it's going.
Professionals get paid. If they have a rare combination of independent authority and a client with respect for them, maybe they can have other principles too. Otherwise, they write the code which gets them paid.
Re: (Score:2)
This comment is exactly what a professional programmer would say.
Pay for my own training on some arcane system where there is no return on my investment, "If you pay for it" - That is what a professional programmer would say. Personal responsibility for the things I'm responsible for. Responsibility without leadership is another term for 'punching bag'.
So, fuckin A, mod parent up and up for such a professional comment.
Re: (Score:2)
Too many programmers feel that it is their employer's job to train them. Sorry, this is just dead wrong. Do you think doctors behave that way?
My wife is a certified nurse-midwife (same level as nurse practitioner, basically a step below MD) and her employer pays for her continuing medical education. Maybe he should stick to talking about programming and programmers.
Re: (Score:2)
You may be a professional, but if I may be frank on the matter, you come across as having the attitude and work ethic of a rank amateur. I've sat in at interviews with would-be colleagues who demonstrated similar attitudes, and thankfully none of them ever got hired on. I have also had the misfortune of working with a few that I did not sit in on the interview with, and in my experience, they move on quickly, rarely sticking around with any one company for more than about a year or so.
So yes.... you mi
Re: (Score:2)
It is passion that is the mark of the amateur; the word is derived from the Latin for "love", after all.
To a professional, passion is dangerous, it leads to doing things that aren't remunerated.
Ah, but promotions in this profession are a simple and spare thing. You work a few jobs, eventually you start calling yourself "Senior". After that,
Re: (Score:2)
Re: (Score:2)
Whoa, so much hot air you could fly a blimp across the Pacific on it.
Professionalism isn't about staying at a job that doesn't pay your worth.
And with your attitude regarding requirements and salaries, you only qualify as a professional con artist.
Re: (Score:2)
Re: (Score:2)
Not necessarily that most that they possibly can, but certainly no less than what the employee is rightly worth, given whatever it is that they do for the company. If an employee believes they are worth more than the employer is paying, they should rightfully try and secure alternative employment. In the meantime, however, failing to perform to t
Re: (Score:2)
Because they care about doing the best work that they can... they want the quality of their work to be exemplary of the very best they can do, so they can take personal pride and satisfaction in how they did the job. I am over 50 years old, and have been in this industry professionally now for roughly half of my life. I don't think I'm particularly inexperienced, and the only people who ever call me young these days are those who are my paren
Re: (Score:2)
I sort of agree but I think you're being a bit too defensive. It is the job of the professional to explain the importance of clean code, fixing bugs etc to your boss. After you, as a technical specialist, has explained the importance of doing things the right way, it is up to your boss to make the business decision of playing safe or taking a risk. Often, risks are not just in the code. If the release is delayed (again), the customer may loose confidence (again) and leave. It is the job of the boss to weigh
Re:Picking one at random (Score:5, Insightful)
I just can't stop thinking about the stupidity of this.
Doctor: Hey, patient, would you like to try some new meds I read about on the internet yesterday while my kids were screaming? I haven't tried them or read any scientific studies and I am unsure about the use-case compared to existing drugs but they are very popular in some facebook groups.
Navy Officer: Hey, we're getting a new aircraft carrier next year so I expect all of you to go home and read up on it and start practicing at home. We'll call you when there is a war and your skills are needed. You'd better be self-trained experts by then!
University head: What's all this "research" I keep hearing about? Take some responsibility for your own careers and stay up to date in your spare time! Now, go back to work. We need more folded napkins!
Re: (Score:2)
Agreed. The field is just too large for people to have *any* chance of keeping a useful handle on what is going on. You are going to have to specialise. The trick I think is to know what you don't know, not to keep up with everything. I was recently asked by a potential client if I could produce a mobile phone app for them - 'no chance, i'm not competent at that' was my reply. I pointed them at someone who specialises in this work. Knowing what you don't know (and who does!) is a much more useful skill than
Re: (Score:2)
If you happen to have a life outside code, you apparently don't count as a "real" programmer any more.
I know a couple of guys who graduated as computer engineers from the university, got good jobs and never bother to stay current with technology on their own time. About seven years later, they both got laid off during the dot com bust, took a six month vacation while drawing unemployment benefits, and discovered that their job skills were obsolete. They could have bought a book, went back to school or enrolled in a boot camp. They didn't. AFAIK, they're still working as drug store clerks.
Personal responsibility? Why not start at the top? (Score:3, Insightful)
I just f*** love it when the lowly programmers were asked to take "personal responsibility" when everyone else who earned more and have more authority, such as managers, wouldn't.
Where's the guy taking "personal responsibility" for the requirements document, which changes weekly/daily?
Where's the manager taking "personal responsibility" when the project have to keep going on the original schedule even when short staffed?
Where's the PM taking "personal responsibility" when unreasonable death march schedule was accepted?
So when sh*t hits the fan, the *programmer* should take "personal responsibility"? You think we were fools?
Number 166 (or actually 165) (Score:2)
Start lists with an index of zero.
Re: (Score:2)
I would say "start lists with the index that's the convention for your programming language." And the only language I know of off the top of my head that uses a starting index of 1 is Visual Basic, and if you're using VB you should probably just kill yourself.
Separate Data from interface (Score:2)
Composite/Structured Design was published way back in the late 1970' and detailed how rules should be in one place only as well as touching on the interfaces to access data and rules. Apple used the MVC structure to separate data from the viewer and methods. OO programming made this much easier to do. Computers are so fast any penalty, in most cases, is irrelevant.
Cargo Cult Metrics without science (Score:2)
Dirty code is defined as ' overly complex or highly coupled.' As a programer you are expected to deliver X number of features by Y date. Unless one of those features is 'simple and loosely coupled code' what does that have to do with predicting anything? For performance you don't predict. Experiments are the only thing you have that work: test and change an
Production server (Score:5, Informative)
Under no circumstances — ever, at all — should a developer have access to a production server.
I'm one of two developers on a five person team. The other people are: CEO/sales, marketing/customer support, and QA. If I didn't manage the production server, there would be no releases. Perhaps this would be more accurate:
Under no circumstances — that I've personally experienced — should a developer have access to a production server.
Re: (Score:2)
No. Just because you're doing it wrong doesn't mean the advice is invalid. Now, just because you're doing it wrong doesn't mean that you can do it right. I assume there's a financial reason for your setup. But you're still wrong.
Re: Production server (Score:2)
What if I ran my own company with no employees? Would I be "doing it wrong" if I handled production deployment myself?
Re: Production server (Score:2)
That's exactly our process. Nothing goes to production without being tested in the test environment first.
Re:Production server (Score:4, Insightful)
The real advice is that "while working in the role of Developer, do not have access to the prod servers". If you additionally have the role of "sysadmin" from time to time, then so be it, but don't abuse your development power, nor your sysadmin power.
In my experience of big companies, small companies and a few in between this really does work best. People talk of 'creating high walls' and whatnot, but by forcing devs to mould their output into something system-friendly results in a far superior product and far less maintenance overhead. It appears to take longer to get things into production, hence the 'high walls' comments, but the alternative is almost always worse in the long run.
Re: Production server (Score:2)
Well said.
Re: (Score:2)
Like I would trust any one of the handful of infrastructure or helpdesk monkey's to not botch the code transfer.
As an intern, I discovered a crash bug on the test server. My software engineer boss couldn't reproduced it even though we sat side-by-side and I reproduced the bug 100%. Since he couldn't reproduced the bug, he authorized the patch for the production server. A day later the production server got caught in a crash loop. Engineers determined that a deep fix was needed, took the production server offline for three days and the company lost $250K in revenues. My six-month internship ended without a job offer.
Urdu. (Score:2)
Was going to suggest Urdu, but it's already there at number 49.
It's all hogwash (Score:2)
Some of these "things every programmer should know" are just wrong. They are wrong from their observations, their non sequitur conclusions, and their misunderstanding of computer science.
BAH!
Re: (Score:2)
[...] and their misunderstanding of computer science.
But not every programmer has studied computer science.
Re: (Score:2)
[...] and their misunderstanding of computer science.
But not every programmer has studied computer science.
OMG, then they should not be working in the field. Computer Science is what we do.
Re: (Score:2)
Actually, no, what lots of us do is solve real world business problems by automating them using computers. Knowing what the business problem is is just as valuable as understanding how computers work, and you can approach the solution from either direction - neither is implicitly better than the other.
BTW, I'm a CompSci, but I work with Physics Phd types who understand the problems I work on better than I ever will, and we have complementary skills.
Re: (Score:2)
OMG, then they should not be working in the field. Computer Science is what we do.
I can't imagine too many CS graduates who want write a PowerShell script to ping 80,000+ workstations and output the results to an Excel spreadsheet.
Re: It's all hogwash (Score:2)
I am and I can. I think your statement is more about your imagination than it is anything else.
Re: (Score:2)
In computer science, an abstract data type (ADT) is a mathematical model for data types where a data type is defined by its behavior (semantics) from the point of view of a user of the data, specifically in terms of possible values, possible operations on data of this type, and the behavior of these operations.
What this *practically* meant in, say, Modula-2, was that the programmer of the ADT implemented the logic of the data type in a separate module that hid the "low-level" implementation details, as opposed to exposing the internal representation of the data type and letting clients manipulate its constituent parts "by hand". Exported functions defined the possible values, operations, and their behavior.
What this means i
Re: (Score:2)
Programmers in school today have problems with pointers because SJW nimwits teach them to believe that "men's room" is a pointer that can be interpreted in two ways
The ordinary prick vs. the overloaded prick. After all these years, you would think the latest version of C++ would have settled this problem.
Re: (Score:3)
Yeah, don't you hate it when someone with an idiotic political agenda finds a way to work it into every topic?
Re: (Score:2)
Re: (Score:3)
Number 38 will shock you!
Re: (Score:2)
Oh, and use MVC (Model View Controller).
No, never, ever. Not even at gunpoint. Not even if you were holding my wife and kids at gunpoint.
MVC has caused more heartbreak and aneurysms than tequlia and bacon combined.
Ok, why?
Re: (Score:2)
It's often used for systems that are way too small to ever need the resulting complication. And when the system needs to be extended, it frequently appears what it needs to work with doesn't fit the current implementation in the least, and instead of writing a trivial interface, you are forced to massage the MVC engine/framework into fitting the new thing.
It's a decent system if you know majority of requirements a'priori, the system is big, and can only grow in well understood ways.
If the system is to grow
Re: (Score:2)
Q: what's the resemblance between an engineer and a dog?
A: both have intelligent eyes, but none can express themselves.
(My father told me this, he's an engineer)
Re: (Score:2)