Live data from Hacker News

Hopefully more controversial programming opinions

prog21.dadgum.com

51–60 of 103 posts

Re: Hopefully more controversial programming opinions

#51

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%…

[deleted]

Re: Hopefully more controversial programming opinions

#52
post #40

Earlier quoted context omitted.

To make something fast or to make something scale you don't need a proof. You need a profiler.

To a certain degree, this is true. However, a profiler won't turn the DFT into the FFT.

The FFT only needs to be invented and optimized once, though, then everyone else can just link in libfftw or kissfft.

All those software tradespeople can do the jobs that require connecting pieces together. A tradesperson can be taught enough to know which algorithms to apply in which situations.

Computer scientists become academics inventing new algorithms, and analyzing and perfecting the ad hoc algorithms created by software tradespeople.

Aside: I wish the English language would just decide that "man" and "men", when used as part of a compound word like "tradesman", is gender neutral.

Re: Hopefully more controversial programming opinions

#53
Great stuff. Since these are controversial opinions, I somewhat agree/disagree.

- Computer science should only be offered as a minor. Good point, assuming that you don't consider theory an end in it self. I consider theory mind opening, even if it doesn't make money per se.

- It's a mistake to introduce new programmers to OOP before they understand the basics.. Fully agree.

- You shouldn't be allowed to write a library for use by other people until you have ten years of programming under your belt. Another good point. Writing a good library (or designing an API) is one of the more challenging things you can do, because it requires a good understanding of the problem, simple design, and sensitivity to conventions (which only come from long experience).

- Superficially ugly code is irrelevant. Somewhat true, but the main problem with ugly code is that nobody wants to touch it. So if its functionally correct, readability remains irrelevant until you need to make a change.

- Purely functional programming doesn't work Agree, in the sense that there exists problems where a purely functional approach is not the best. I think you can run pretty far with purely functional though.

- A software engineering mindset can prevent you from making great things. Strictly true, but it should be said that the opposite mindset will eventually destroy the things you made.

Re: Hopefully more controversial programming opinions

#54
post #40
post #24

Earlier quoted context omitted.

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.

To make something fast or to make something scale you don't need a proof. You need a profiler.

A profiler is for micro optimisations. A profiler won't let you go from bubble to quick sort for example.

Re: Hopefully more controversial programming opinions

#55
post #42

[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…

Because understanding exactly what program should do is more important than understanding what are best practices in CS, or how to abstract things. If you can keep all interactions of your app in your head, then it doesn't matter how badly designed the code is. Architecture is only important because it makes it possible to change things without understanding the whole thing. And complete understanding with bad archit…

I've never seen anything labelled a "best practise" that has had anything to do with what I would call CS.

Re: Hopefully more controversial programming opinions

#56

Earlier quoted context omitted.

To a certain degree, this is true. However, a profiler won't turn the DFT into the FFT.

The FFT only needs to be invented and optimized once, though, then everyone else can just link in libfftw or kissfft. All those software tradespeople can do the jobs that require connecting pieces together. A tradesperson can be taught enough to know which algorithms to apply in which situations. Computer scientists become academics inventing new algorithms, and analyzing and perfecting the ad hoc algorithms created…

> The FFT only needs to be invented and optimized once, though, then everyone else can just link in libfftw or kissfft.

> All those software tradespeople can do the jobs that require connecting pieces together. A tradesperson can be taught enough to know which algorithms to apply in which situations.

Is that a circular argument? If we had enough people cranking out smart enough algorithms (like the automatic programming example upthread), would we need so many tradespeople?

Re: Hopefully more controversial programming opinions

#57
post #43

Earlier quoted context omitted.

The architect sounds obsessed with Java... first sign of craziness! Disclaimer: I like C/C++/Python.

Actually its all the 'design' craze. Most architects think drawing UML diagrams on mspaint to be a sign of technical superiority. The real issue I think is heavy OO programmers(read java) can't live without. 1. Design patterns- The art of bloating already heavily bloated code. 2. Avoiding meta programming of any kind. 3. Love towards getters/settters and absolutely anything that lends to code bureaucracy. Why get/set…

So much this

100 lines of python can be turned into a hundred men-hours / 6-digit budget project in Java

Re: Hopefully more controversial programming opinions

#58
post #48

> Purely functional programming doesn't work, but if you mix in a small amount of imperative code then it does. That isn't controversial nor is it an opinion. It's just the truth. Purely functional code has no side effects. The entire point of a program is to have side effects.

Not true. For example, a compiler can be a pure function. It accepts input that is the source code, and outputs the machine code. There's no side effect there. I admit it needs minor scaffolding to always read all of stdin first, and write all to stdout at the end, but the programme, as written by the programmer, is a pure function.

This is one of several ways that Haskell worked before there was an IO monad [1], all allowing pure functional useful programmes.

[1] S. Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in haskell. Technical report, Microsoft Research, Cambridge, 2010.

Re: Hopefully more controversial programming opinions

#59

Earlier quoted context omitted.

I would like to make a few points , This is only possible because your dad is the only one who has to deal with this program and also he only works on this one big complex thing which he knows really well .

oh hell yeah, absolutely. This sort of code is not uncommon at all but is pretty much incomprehensible (let alone maintainable) for anyone beyond the original implementer

If one day somebody else does inherit the codebase, are there any tools out there that are designed to help people in that situation? Like something that de-spaghettifies everything?

Re: Hopefully more controversial programming opinions

#60
post #48

> Purely functional programming doesn't work, but if you mix in a small amount of imperative code then it does. That isn't controversial nor is it an opinion. It's just the truth. Purely functional code has no side effects. The entire point of a program is to have side effects.

I prefer to mix in a small amount (well, as much as I can before it starts to feel forced) if FP into my imperative programs.
Post reply on HN