Live data from Hacker News

Signs that you're a bad programmer

sites.google.com

61–70 of 131 posts

Re: Signs that you're a bad programmer

#61
post #51
post #18

Google cache for those who hit the "pageview limit exceeded" nonsense: http://www.google.com/url?sa=t&source=web&ct=clnk&#3...

I think he missed one. A bad programmer won't understand or take into consideration the limits of the target platform. A good example is posting an article to a host with limited bandwidth.

That's a bit harsh, that's a distribution problem, not a development problem. It's been long time since I've used free hosting, is there provider that doesn't limit bandwidth? (This is just out of curiosity.)

Re: Signs that you're a bad programmer

#62
After reading it twice, there are many points that are good, but there also some points that are not so clear cut, or plain bad. Maybe I am a bad programmer, but I disagree with some points:

# (OOP) Writing lots of "xxxxxManager" classes that contain all of the methods for manipulating the fields of objects that have little or no methods of their own

I guess they keyword 'lots' make this ok, but having plain objects (scruct like), passed around in the application, and having some managers is fine. eg. if you have an application that passes around contacts, you can have a ContactsManager, taking care of all the messy bussines (local peristence, remote persitence, deleting, etc., while contacts remain simple objects. ActiveRecord pattern goes the other way, where this logic is placed in the objects. Both are fine.

# (Relational) Treating a relational database as an object store and performing all joins and relation enforcement in client code

--I guess all those programmers in the "NOSql" movements are idiots. (they are not, some of these people are really smart). Don't take this statement too seriously.

# Re-inventing or laboring without basic mechanisms that are built-into the language, such as events-and-handlers or regular expressions

--I think regular expressions are evil, obscure, and performance is highly depended on the implementation. Practical example, checking if an email address is valid. While some people go all the way crazy with regular expression, All I do is check that there is an '@', or a '+', at least one '.', and minimum/maximum lengths. You don't regular expressions for that, as no matter how smart you think your expression is, there is a great chance somebody that edits it will fuck it up just by changing a character on it.

# Re-inventing classes and functions that are built-into the framework (eg: timers, collections, sorting and searching algorithms) *

Done many times. If you are doing mobile, most of platform implementation (at least in J2ME) just suck ass. You can't rely on them. Heck, in my previous company we did even font rendering, thread worker queues, etc. as the scheduler was unreliable, etc.

#Recursive subroutines that concatenate/sum to a global variable or a carry-along output variable

--For some problems carry-along variable are needed.

eg, in a binary search tree, trying to print only the nodes in a certain level. printTreeLevel(tree, 2) -- will print only the nodes at level two

print(node, level)

  if level == 0

     print node.data

  else

     printTreeLevel(node.left, level - 1)

     printTreeLevel(node.right, level - 1)

  
# Writing business-logic functions with tragically compromising side-effects, such as updating a user interface or performing file I/O

--I guess it depends on the definition of what "business-logic" is. This guy thinks it more as the transactional/model part and not a controller. For some apps, the business logic is the main controller. Plus, "bussines logic" is more of a managerial speak anyways.

#Homebrew "Business Rule Engines"

-- Maybe I am not old enough, but I had to look it up what a "Business Rule Engine" is. Seems stuff from the Dot Com era/enterprise world.

#Code that tries to prevent an exploit from working by searching for the exploit's signature

--Haha. That's the whole Antivirus industry. I agree with him, and I don't have antivirus software, but it seems that those companies made millions by breaking this rule.

Re: Signs that you're a bad programmer

#63
post #30

Earlier quoted context omitted.

The inability to determine the order of program execution is what made me give up haskell for ocaml and scala. Does that make me a bad programmer?

Why do you care what order your functions run in Haskell? Seems to me you want them to run as late as possible and no sooner.

He doesn't. What he really cares about is memory consumption, especially stack consumption. Order of execution can influence that a lot: unevaluated chunks may hold quite a lot memory, and their evaluation in normal order may overflow the stack (in most implementations).

These problems are called "lazyness leaks". This is why he still cares about order of evaluation.

Re: Signs that you're a bad programmer

#64
post #19

It's down, but it sounds like a copy of http://badprogrammer.infogami.com/

Just moved it to another host. Not like Google was any better >:|

I noticed when one of your articles was posted to reddit that there was no signature on it, it's nice to know who is behind them. Do you think you will ever publish these in book form? Your tips are blindingly accurate, it could definitely be a Code Complete III, updated to include functional and declarative programming.

Re: Signs that you're a bad programmer

#65
post #60

Here's a flaw which I've seen in several otherwise good programmers - forgetting that sometimes the core purpose of code is to be read and maintained by other human beings. Some of those other human beings may not have had the time to catch up on the latest/greatest language feature or 'trick' and may miss subtleties of your implementation. I get worried when I see someone take a mainstream language (C#, Java, Python…

[deleted]

Re: Signs that you're a bad programmer

#66

Oh man, I wish I had this at my last job half the team had over 50% of these symptoms, one guy had 90%. They believed, and had somehow convinced management, that they were great programmers! Some awesome practical examples from those guys below: Overheard statement "You know when I was in college I learned C. I just can't get the hang of these objects, so I try to avoid them". The guy who said this is now 34, and has…

ouch... I love the 'stop making this so complicated bit'. While some people really don't get it I'm pretty sure that most people could learn how to program with some competence. The only metric I've found to measure programmer competence reliably is how big a project you can manage to complete. Some people get stuck at around 100 lines, others in the thousands or tens of thousands, some can keep their rudder straight…

I disagree; what takes extreme self discipline and organization is doing in 3,000 lines of code what a less organized developer would have done in 15,000. Code is a liability; developers who can get to the point save you in complexity and maintainability.

Re: Signs that you're a bad programmer

#67
post #61
post #51

Earlier quoted context omitted.

I think he missed one. A bad programmer won't understand or take into consideration the limits of the target platform. A good example is posting an article to a host with limited bandwidth.

That's a bit harsh, that's a distribution problem, not a development problem. It's been long time since I've used free hosting, is there provider that doesn't limit bandwidth? (This is just out of curiosity.)

We don't :) (Weebly)

Re: Signs that you're a bad programmer

#69
post #36

The author lists the following as a symptom of being "unable to reason about code": "5. 'Bulldozer code' that gives the appearance of refactoring by breaking out chunks into subroutines, but that are impossible to reuse in another context (very high cohesion)" I disagree with this. The purpose of breaking out code in to subroutines isn't only for code reuse. If you don't break out code in to subroutines, at some poin…

A precedural decomposition should at least partition your code along meaningful lines so that a reader can potentially find something faster or understand its functionality in simpler terms. If they have to jump all over the place to make any sense of your code, you're just obfuscating.

I've seen plenty of bad code where a task is broken down arbitrarily, creating sets of procedures like foo, begin_foo, execute_foo, actually_do_foo, foo_part_two, etc. This seems to be a particular problem with OOP, where tasks have to be handed off from object to object, down the chain of responsibility.

Re: Signs that you're a bad programmer

#70
post #15
post #12

Earlier quoted context omitted.

I can't learn LISP. I can get reasonable work done in imperative functional/OO languages like Perl, C, Java, etc. and took the time to learn Erlang to get a look at functional programming and I can drop the SQL bomb like nothing else (so I can do declarative too) but every time I've sat down to learn LISP because people say it will make me a better programmer, I've gotten distracted and haven't finished. I don't thin…

I don't think Lisp being opaque has anything to do with your ability to learn a particular PL such as Common Lisp, Scheme, Arc or Clojure. Rather, opacity is usually a term levied at a syntax , when it makes it hard to understand what the underlying semantics of the program are. Lisp has the least "syntax" of any programming language I know of, so if it's opaque to you (e.g., you can't take a guess at what "(+ 2 3)"…

I don't understand the following point you made:

"so if it's opaque to you...,you probably shouldn't be programming"

So your saying that someone should not program if they haven't learned basic lisp ( 5 )?

Or are you suggesting that there should be some time limit... like if you program for X months but don't understand it you are forced to quit.

But.. further... What is the purpose of forcing these people to quit?

And.. What is the purpose of belittling these people?

Post reply on HN