Live data from Hacker News

Hopefully more controversial programming opinions

prog21.dadgum.com

21–30 of 103 posts

Re: Hopefully more controversial programming opinions

#21
post #7

It's a mistake to introduce new programmers to OOP before they understand the basics of breaking down problems and turning the solutions into code. Given how well I remember my classmates with little-to-none programming experience struggled with understanding pointers while not being able to write the simplest algorithms, I thought this was a no-brainer. Is it really a controversial opinion?

I've never understood what's confusing about pointers...

1) Indirection. Pointers require thinking in a few steps. Indirection is hard. It is a vital skill in any kind of programming (or especially debugging), but it does not come naturally to people who've only ever had to deal with the concrete.

2) Early on, you learn that ints and chars and floats and some_structs are fundamentally different data types. Then suddenly you're told that int%s, char%s, float%s, some_struct%s, and even void%s are fundamentally the same. Huh?

3) The fact that C uses % both to create a pointer and to dereference. These are conflicting meanings, and the unrelatedness of those two concepts is not sufficiently explained.

EDIT: Silly HN parser. I now replaced asterisks with %s.

Re: Hopefully more controversial programming opinions

#22
> Computer science should only be offered as a minor. You can major in biology, minor in computer science. Major in art, minor in computer science. But you can't get a degree in CS.

The problem is not that Universities produce poor CS majors. They don't. The problem is that everyone else expects that a CS major is going to be a good commercial developer. Some are, but that's just the odds.

If you want to be a programmer, do an software ENGINEERING degree. It deals with the practical issues and you actually do lots of real, actual, programming. Or go to a media design school, where you do lots of actual web programming.

Expecting every CS major to be a great programmer, is like expecting every Physics major to be a good baseball player. Sure, (s)he knows the optimal angle to strike ball to achieve a home run, but actually doing so requires a whole of experience and real world context.

(PS. I have a physics degree, and I'm a software developer, not a baseball player. But that's because I programmed a lot for fun and profit before going to university, and CS seemed like a big backwards step. And physics is more fun.)

Re: Hopefully more controversial programming opinions

#23
post #7

It's a mistake to introduce new programmers to OOP before they understand the basics of breaking down problems and turning the solutions into code. Given how well I remember my classmates with little-to-none programming experience struggled with understanding pointers while not being able to write the simplest algorithms, I thought this was a no-brainer. Is it really a controversial opinion?

I've never understood what's confusing about pointers...

http://homepages.tcp.co.uk/~nicholson/alice.html

Re: Hopefully more controversial programming opinions

#24

I would go farther in regard to the Computer Science point. CS programs should be burnt to the ground. And in their place we should build up three separate things. First, software trade schools that are actually good (e.g. not ITT). Second, for reals software engineering majors at colleges, that are heavy on things like practical programming, tools (version control, issue tracking, automated build systems), refactori…

The problem with software trade schools, even though you may not require a pure maths focus, I still expect people who program professionally to be good at maths. I would expect most programmers to analyse algorithms in a formal manner if they have to. And the people capable of doing maths at that level are not the people that traditionally go to trade schools.

Re: Hopefully more controversial programming opinions

#25

Earlier quoted context omitted.

I've never understood what's confusing about pointers...

1) Indirection. Pointers require thinking in a few steps. Indirection is hard. It is a vital skill in any kind of programming (or especially debugging), but it does not come naturally to people who've only ever had to deal with the concrete. 2) Early on, you learn that ints and chars and floats and some_structs are fundamentally different data types. Then suddenly you're told that int%s, char%s, float%s, some_struct%…

3) That make's sense. For example...

    int *i;
means "When you dereference i, you get an int."

Re: Hopefully more controversial programming opinions

#26
post #10

[update: I've got hold of some of the code. Here's a copy of one of the programmes http://pastie.org/4615158 ] I have an awesome story that i think I've told before, but I'll tell it again anyway :) My father-in-law is a pharmasist. back in the early 90s computers were starting to make their way into Pharmacy and the first few pharmacy sortware packages appeared. this increased with time, as you'd expect. At some poi…

I wonder how much that initial version changed during the 20 years of maintenance. I find it hard to believe that someone was maintaining it for 20 years without improving the quality (of the code/design) and making it easier to maintain. Have you seen the code base of the initial version or of the version that is currently being used?

You find it hard to believe because you are convinced it can't be done other wise. Once you see some one doing it you will believe otherwise.

Re: Hopefully more controversial programming opinions

#27
I agree with the first 10 controversial opinions, and I agree with this followup, to boot. All good points, all worthy of discussion.

As an autocrat, I'd also add another few, what I conceive to be contemporaneously controversial point of view, to the discussion:

* Code Coverage matters. Dead code is broken code. Always.

* Programming is Always in Service To The User. The User is the only way your creative, artistic, amazing, junk of spaghetti-code crud, is going to ever get Used. Use is where your software is alive. Non-use = Dead. Thus, the USER is YOUR MASTER. Serve them.

* Pretty tools are one thing, ugly tools another thing entirely. NO! WRONG! ALL TOOLS ARE TOOLS. Use what works. If you're using something because you want to, even though it sort of doesn't work, its no longer a tool, but instead an .. ingredient .. of something. Something else, perhaps something creative. Do that shit on your own time: use the tools which work, at work.

* Discussion is the only way things ever get resolved. If you hate on something about someone, discussion is the only way the problem will ever get solved, ever. Ignoring something and being afraid to discuss really secretly means 'do not want' to solve the problem. Even vile words are still yet but words, words eventually work it out. Developers who do not use words are not the scribes they're meant to be ..

Re: Hopefully more controversial programming opinions

#28
post #2

Computer science should only be offered as a minor. You can major in biology, minor in computer science. Major in art, minor in computer science. But you can't get a degree in CS. The way university is structured, it would be nearly impossible to minor in CS and learn anything low-level or advanced like computer architecture or operating systems. Perhaps you can push out a desirable employee with a practical knowledg…

I am a bioengineer by degree, software developer by profession. Most valuable skill that I use in the day-to-day is thinking like a programmer, and understanding how to make sense of data in an intelligent way. But ultimately, this is all about solving problems - programming is simply a tool towards this end. Go up to a carpenter (and I mean a well-trained carpenter, the kind who carries more than just the PHP hammer [0]) and ask him which carpentry technique to use, and he'll tell you the right answer in a flash. But ask him whether carpentry is even the right approach for a given problem, and I wish you good luck.

Programming skills are important, but a deep knowledge of the problem domain is sometimes far more critical to being able to actually solve the problem.

[0] http://www.codinghorror.com/blog/2012/06/the-php-singularity...

Re: Hopefully more controversial programming opinions

#29

[update: I've got hold of some of the code. Here's a copy of one of the programmes http://pastie.org/4615158 ] I have an awesome story that i think I've told before, but I'll tell it again anyway :) My father-in-law is a pharmasist. back in the early 90s computers were starting to make their way into Pharmacy and the first few pharmacy sortware packages appeared. this increased with time, as you'd expect. At some poi…

This reminds me of a manager of mine who wrote a 10,000 line Perl script.

He thought himself how to write Perl in a week. And then started coding. He wrote a script to automate a very tedious testing process so perfectly, we were able to reduce our test team by like 70% and test more precisely than before.

It was fully procedural code. And it looked monstrous. Our architect challenged him that it won't workout. He even challenged to rewrite it in Java, but that project never finished. He was never able to ever complete the rewrite.

It motivated me to learn Perl. Since then my life has been totally different. I've done mountains of work alone working, hacking during nights.

I learned the following things from that episode:

1. First write the program.

2. Write the correct program.

3. Write the program to run fast and efficient(scalability and all that)

4. Beautify the program.

But most people never cross 2)- The point is there are tons of people who can do this tasks related to micro optimization. The people who win in a ordinary work environment are ones who know the art of converting ideas to sell able products in the fastest way possible.

By the way that manager also wrote database clients in C++ which helped us troubleshoot our in memory databases from remote locations. Again the architect challenged to get it done Java, as before the project never completed :)

Its a fact that majority of the software world is hacked and held in existence with tools like Perl and Php. The people who care about artistic elegance are few, they often fail and generally don't matter.

Re: Hopefully more controversial programming opinions

#30

Earlier quoted context omitted.

1) Indirection. Pointers require thinking in a few steps. Indirection is hard. It is a vital skill in any kind of programming (or especially debugging), but it does not come naturally to people who've only ever had to deal with the concrete. 2) Early on, you learn that ints and chars and floats and some_structs are fundamentally different data types. Then suddenly you're told that int%s, char%s, float%s, some_struct%…

3) That make's sense. For example... int *i; means "When you dereference i, you get an int."

When I see

   int a;
I read "create an integer variable called a".

    int *i;
means, "create a variable that when dereferenced, points to an integer".

Makes sense once you understand it, but I can definitely understand how a beginner would find it confusing.

Post reply on HN