Live data from Hacker News

How to improve your programming skills

antoarts.com

81–90 of 93 posts

Re: How to improve your programming skills

#81
post #39

Earlier quoted context omitted.

Counting proper languages I actually wrote something useful in, my path looks like: C64 BASIC -> C64 raw machine code -> QBasic -> x86 raw machine code -> Turbo Pascal -> C -> Visual Basic -> Java -> O'Caml -> Delphi7 -> Python -> C++ -> Erlang -> C# -> Haskell -> F# -> JavaScript To keep learning very different languages is also what guarantees you will be able to get a good job when your bread-and-butter language f…

Java and C++ are designed for serious work. In these, you take types, error checking and exceptions seriously, you keep the code clean and robust, and you R the FM thoroughly for every single external function you call. What type is "null" in Java? What type is the stack in C++? Java and C++ have very little typing. You have to type a lot of types into your source code, but they don't get you anything. For every Java…

Completely agree with the types part. I did not try to say that Java or C++ are strictly typed, but that the types (ie. classes) that are used in programs are taken seriously. By this I mean that if you are looked down by serious C++ developers upon if you send your references via void pointers or typecast by guessing.

Re: How to improve your programming skills

#83

> 10. Don’t rush to StackOverflow. Think! Disagree with this one. My rule is, "If you get stuck for more than 10 minutes, post to StackOverflow." I'll post my question then continue trying to solve it myself. Sometimes someone will post a good answer right away, saving me lots of time. Other times I'll end up solving my problem on my own, but I'll still learn something valuable from a comment or answer somebody posts…

I second this opinion. My experience has been, when I post to stackoverflow, it forces me to explain the problem as clearly as possible to someone else. In doing so, I have sometimes found the solution in the code or a level of abstraction higher/lower.

Even when I post, if it's not quickly solved and gets very few hits, at least I justify the problem as being non-trivial... this is also useful in determining cost/benefit of even solving the problem (perhaps it's better to spend your time on other things).

Re: How to improve your programming skills

#84
post #74

Earlier quoted context omitted.

I've heard about a lot as well, especially in the banking industry, yet not actually met anyone. Does anyone have any data or any numbers on how much someone can get paid doing cobol legacy maintenance? Just for educational purposes of course.

A lot of banks still have mainframes lurking somewhere on which they run (legacy?) accounting and settlement systems. Interestingly, a lot of the mainframe / COBOL programming jobs are outsourced, mainly to Indian companies. Infosys and TCS (the two huge outsourcing shops) actually train some graduates in Cobol / Mainframe programming. When I worked at ${Wall Street Bank}, we had an outsourced team in Chennai looking…

Ah so it isn't like theres all these American companies that are going to be paying top dollar to maintain their legacy, mission critical COBOL systems. They're outsourcing it for minimum wage.

Re: How to improve your programming skills

#85

Earlier quoted context omitted.

It sounds like you value "getting things done" over "improving your skills." That's not a bad thing, but its not what the article was about.

I don't know about that. My point was that by posting to StackOverflow you can do both more efficiently. I don't see much of a point in trying to trial-and-error a problem, hunt through documentation, etc, when somebody more experienced can just tell you what to do in a few seconds. The same lesson is learned either way.

"The same lesson is learned either way."

Not at all. Learning how to find the solutions to a problem is very different from learning the solution to your specific issue. I'm not saying its always worth your time, but there is a different lesson learned when you find the solution yourself.

Re: How to improve your programming skills

#86
post #39

Earlier quoted context omitted.

Counting proper languages I actually wrote something useful in, my path looks like: C64 BASIC -> C64 raw machine code -> QBasic -> x86 raw machine code -> Turbo Pascal -> C -> Visual Basic -> Java -> O'Caml -> Delphi7 -> Python -> C++ -> Erlang -> C# -> Haskell -> F# -> JavaScript To keep learning very different languages is also what guarantees you will be able to get a good job when your bread-and-butter language f…

Java and C++ are designed for serious work. In these, you take types, error checking and exceptions seriously, you keep the code clean and robust, and you R the FM thoroughly for every single external function you call. What type is "null" in Java? What type is the stack in C++? Java and C++ have very little typing. You have to type a lot of types into your source code, but they don't get you anything. For every Java…

> What type is "null" in Java?

    String
> What type is the stack in C++?

    struct Stack;  // No definition

    Stack *

Re: How to improve your programming skills

#87

Learning Javascript changed my Perl for the ... more fun to write. Possibly better, too. I've started passing around coderefs as arguments to functions a lot more recently, and allowing people who use my APIs to do just that... I've been writing code that allows you to describe a website in data and at a high level recently, and builds you up all the methods you need to interact with it. In general, when people need…

Not to golf your code or anything, but that's around the point where I switched to Ruby. It's almost a drop-in replacement, you can be coding in minutes with all the handy shortcuts non-PERL coders don't know they're missing.

name = args[:form_name].respond_to?(:call) ? args[:form_name].call(user_options) : args[:form_name]

Fewer sigils, no array/scalar access nonsense, real and convenient objects, etc.

Re: How to improve your programming skills

#88
post #87

Learning Javascript changed my Perl for the ... more fun to write. Possibly better, too. I've started passing around coderefs as arguments to functions a lot more recently, and allowing people who use my APIs to do just that... I've been writing code that allows you to describe a website in data and at a high level recently, and builds you up all the methods you need to interact with it. In general, when people need…

Not to golf your code or anything, but that's around the point where I switched to Ruby. It's almost a drop-in replacement, you can be coding in minutes with all the handy shortcuts non-PERL coders don't know they're missing. name = args[:form_name].respond_to?(:call) ? args[:form_name].call(user_options) : args[:form_name] Fewer sigils, no array/scalar access nonsense, real and convenient objects, etc.

Fewer sigils

As with PHP, reusing the same sigil for everything misses the point of sigils rather badly. I count five instances of two sigils in your example and each sigil character has another syntactic meaning within the same line.

Re: How to improve your programming skills

#89
post #87

Earlier quoted context omitted.

Not to golf your code or anything, but that's around the point where I switched to Ruby. It's almost a drop-in replacement, you can be coding in minutes with all the handy shortcuts non-PERL coders don't know they're missing. name = args[:form_name].respond_to?(:call) ? args[:form_name].call(user_options) : args[:form_name] Fewer sigils, no array/scalar access nonsense, real and convenient objects, etc.

Fewer sigils As with PHP, reusing the same sigil for everything misses the point of sigils rather badly. I count five instances of two sigils in your example and each sigil character has another syntactic meaning within the same line.

If sigil means non-ascii character, there are six. If you use it to mean name-modifier (changes what the following string means) there is one, the colon. What did you mean?

And yes, colon is also the or in the ternary operator.

But there are still less than Perl, for the same length of code, and the code is simpler - .call() the thing if it.respond_to?(:call)

Re: How to improve your programming skills

#90
post #87

Learning Javascript changed my Perl for the ... more fun to write. Possibly better, too. I've started passing around coderefs as arguments to functions a lot more recently, and allowing people who use my APIs to do just that... I've been writing code that allows you to describe a website in data and at a high level recently, and builds you up all the methods you need to interact with it. In general, when people need…

Not to golf your code or anything, but that's around the point where I switched to Ruby. It's almost a drop-in replacement, you can be coding in minutes with all the handy shortcuts non-PERL coders don't know they're missing. name = args[:form_name].respond_to?(:call) ? args[:form_name].call(user_options) : args[:form_name] Fewer sigils, no array/scalar access nonsense, real and convenient objects, etc.

Your example isn't exactly identical because its not making use the $self object. Your example would look more like this in Perl:

my $name = ref $args{form_name} eq 'CODE' ? $args{form_name}->(@user_options) : $args{form_name};

Taking the original Perl example I would probably write it like this:

my $name = do { my $c = $args{form_name}; ref $c eq 'CODE' ? $self->$c(@user_options) : $c };

Which seems DRYer to me.

Post reply on HN