Thread about the languages ( another one ? )

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27259
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: Thread about the languages ( another one ? )

Post by gilesgoat »

Orangy Tang wrote:It shouldn't surprise me that everyone's background affects how they approach programming to a huge extent, but it still does. For me that mostly means trying to write fully functional, polished and complete games as a one man show in my spare time while still programming 'proper' games full time at work. So that means using any means necessary to write code quicker. And by extension that means writing less code where possible, and writing code to minimise debugging time (both now and to maintain it). I like simple, straightforward, elegant code that expresses the algorithm and logic at work rather than code that's 10% algorithm and 90% dicking around with stuff the language forces you to care about.

Which is why when I see posts like Gile's obsessing over every little byte and cache line and cycle I just want to grab him and shake him and say "What are you doing man? You're wasting your precious coding time obsessing over tedious implementation details because you're control freaking out over every last byte!".

As a lone wolf programmer, time is my most precious resource, and by comparison cycles and bytes are cheap and plentiful. Computers should help me get to where I want to be faster, not drag me down with their discipline and bondage they need to be kept happy.

Oh, and languages, roughly in order: BASIC, C, x86 ASM, Java, Prolog, C++, Python, GLSL, C#, Javascript, Ruby, 6800 asm, Lua.
You are getting me quite wrong here, I want things "that definitely works" and that work without crashing, that's why I want to know EXACTLY what I am doing and why I am doing it not dealing with stuff that hides from me what I am doing even if this "simplifies" in the beginning at least a bit.

"If I don't know what I am doing I can't fix it".

Trust me I believe it too in KISS ( Keep It Simple and Stupid ) or better to say "Keep It As Simple As Possible".

When you do certain stuff on not-so-powerful-machines you will find out that bytes are not so cheap nor plentful nor cycles at all, I still remember how much we were "on despair lane" when we did try the first time porting the Neon engine on the iPad and everything was crawling like shit and we did not understand what was going wrong.

Ask Yak about the story of "the blue sky on five a day" another example where "the most elegant and straightforward solution was the worst" - despite looking really the simplest one.

- it must not crash
- it must run smooth
- 60 fps or die
- I must like it :wink:

And also .. "if you are doing something that is not what you really want to do, then you should not do it".

I stopped doing some jobs because I really could not stand any more doing things I did not want to do .. so .. I mean "yes BUT" .. if you can't do what you really like to do what's the point then :wink: ?
Giles the billy goat
"Baa"
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Thread about the languages ( another one ? )

Post by Barney »

Orangy Tang wrote: Which is why when I see posts like Gile's obsessing over every little byte and cache line and cycle I just want to grab him and shake him and say "What are you doing man? You're wasting your precious coding time obsessing over tedious implementation details because you're control freaking out over every last byte!".

As a lone wolf programmer, time is my most precious resource, and by comparison cycles and bytes are cheap and plentiful. Computers should help me get to where I want to be faster, not drag me down with their discipline and bondage they need to be kept happy.
This is where you and I differ (as does Giles, I suspect). Last year I added a little routine for rotating and scaling graphics, and I agonised over every line - build it, disassemble it, look for optimisations, go back to Delphi and try a different method etc. It took months to get something I was happy with.

The reason I do that is because I port directly from my Delphi build to ARM code - and although the ARM assembly language is very different to the x86, I find that if I've already done the agonising getting an efficient algorithm done then tweaks needed for ARM are few and far between. Cycles on my 2.67GHz core i5 are plentiful, yes, but my Cortex-A8 driven Handheld is nowhere near as fast, and every little helps :)
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
Orangy Tang
Baaaaa!
Baaaaa!
Posts: 1794
Joined: Sun Apr 25, 2004 5:25 pm 0
Location: My secret lab
Contact:

Re: Thread about the languages ( another one ? )

Post by Orangy Tang »

Barney wrote:
Orangy Tang wrote: Which is why when I see posts like Gile's obsessing over every little byte and cache line and cycle I just want to grab him and shake him and say "What are you doing man? You're wasting your precious coding time obsessing over tedious implementation details because you're control freaking out over every last byte!".

As a lone wolf programmer, time is my most precious resource, and by comparison cycles and bytes are cheap and plentiful. Computers should help me get to where I want to be faster, not drag me down with their discipline and bondage they need to be kept happy.
This is where you and I differ (as does Giles, I suspect). Last year I added a little routine for rotating and scaling graphics, and I agonised over every line - build it, disassemble it, look for optimisations, go back to Delphi and try a different method etc. It took months to get something I was happy with.
I should probably clarify that I don't mean that my approach is the best way and should be followed at all times - I'm just giving my background and context as an indication of what by default I value in languages and code. Obviously there's always going to be times when you really do have to sweat the tiny details, and I can geek out over the low level stuff from sheer low-level bit-hackery but it's not my default position.

Partly I think it'd just be nice to get people to think in a slightly more pragmatic way about this kind of stuff. It's socially acceptable for programmers to go on low-level benders and talk about all the crazy memory tricks they've written, but somehow less acceptable to point out that they've optimised a function that's called once an hour and wasn't slow to begin with. And when someone like Giles spends all their time in bit twiddling la-la land and never uses a modern language except to scoff at it then I can't help but think it's a waste of talent.
[ Triangular Pixels.net - play Snowman Village, Rescue Squad, NiGHTS 4k and more ] [ Development Journal ]
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Thread about the languages ( another one ? )

Post by Barney »

Orangy Tang wrote:
Barney wrote:
Orangy Tang wrote: Which is why when I see posts like Gile's obsessing over every little byte and cache line and cycle I just want to grab him and shake him and say "What are you doing man? You're wasting your precious coding time obsessing over tedious implementation details because you're control freaking out over every last byte!".

As a lone wolf programmer, time is my most precious resource, and by comparison cycles and bytes are cheap and plentiful. Computers should help me get to where I want to be faster, not drag me down with their discipline and bondage they need to be kept happy.
This is where you and I differ (as does Giles, I suspect). Last year I added a little routine for rotating and scaling graphics, and I agonised over every line - build it, disassemble it, look for optimisations, go back to Delphi and try a different method etc. It took months to get something I was happy with.
I should probably clarify that I don't mean that my approach is the best way and should be followed at all times - I'm just giving my background and context as an indication of what by default I value in languages and code. Obviously there's always going to be times when you really do have to sweat the tiny details, and I can geek out over the low level stuff from sheer low-level bit-hackery but it's not my default position.

Partly I think it'd just be nice to get people to think in a slightly more pragmatic way about this kind of stuff. It's socially acceptable for programmers to go on low-level benders and talk about all the crazy memory tricks they've written, but somehow less acceptable to point out that they've optimised a function that's called once an hour and wasn't slow to begin with. And when someone like Giles spends all their time in bit twiddling la-la land and never uses a modern language except to scoff at it then I can't help but think it's a waste of talent.
I suppose I agree with your sentiment - people should broaden their minds and see things from a different perspective from time to time. However, the existence of "modern languages" (and I include C in that lot, despite its lengthy history in computing) is what caused me to write my own BASIC interpreter in the first place - I want to code for fun, and I've yet to find a modern language that even approaches "fun" :)
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
Malf
Baaa!
Baaa!
Posts: 205
Joined: Mon Mar 07, 2005 9:31 am 0

Re: Thread about the languages ( another one ? )

Post by Malf »

Orangy Tang wrote:
Darkflame wrote:Anyone had a go at Scala?

Got a big book sitting near me but I haven't given it a go yet.
I've been meaning to have a go at it for a while - there's a lot of cool JVM languages these days. JPython and JRuby are particularly handy for game scripting but their IDE support is still a little lacking.
I had a run-in with it near the end of my tenure at my previous job. That shop primarily focused on Java and used Scala to build a testing DSL and put up a few standalone pieces of code that had minimal direct ties to the main Java source.

A lot of the most obvious benefits to me felt more like syntactic sugar for stuff that required a lot of typing in Java. In that respect it reminded me more of C# than Java in fact (shorter declarations of getters/setters and the like).

It also reminded me a fair bit of Ruby (supporting mixins and being very OO-focused).

Declaring things immutable by defining them as

Code: Select all

val someObject
instead of

Code: Select all

var someObject
was nice as well.

The language route for me (roughly):
  • QuickBASIC
  • C
  • x86 ASM (started learning about it via the "Art of Assembly" docs from the high level assembly guy adam mentioned earlier: http://www.plantation-productions.com/Webster/)
  • Perl
  • C++
  • Java
  • Scheme
  • Barely learning Prolog, LISP, and Ada for a course...
  • A C variant for PICs and a bit of PIC ASM
  • Python
  • C#
  • SQL
  • VB.NET :(
  • Ruby
  • Scala
Based on this list my next target language probably needs to land squarely in the functional realm.
adam
Baaaaaa!
Baaaaaa!
Posts: 4418
Joined: Sat Jun 24, 2006 9:15 pm 0

Re: Thread about the languages ( another one ? )

Post by adam »

i've met a few clojure fans, mostly working for a big mobile manufacturer that does a lot of java, i'm guessing these jvm languages are a bit of a reaction to the verboseness of java, fortunately i think they're allowed to use it at work. another factor is probably the popularity of java... well the widespread use of java might be more accurate, lots of jobs, is top of the list sometimes

http://jobstractor.com/monthly-stats

this is just jobs advertised on twitter though, php is number 1, objective c high up there and it's also the best paid apparently, for a junior anyway
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27259
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: Thread about the languages ( another one ? )

Post by gilesgoat »

And when someone like Giles spends all their time in bit twiddling la-la land and never uses a modern language except to scoff at it then I can't help but think it's a waste of talent.
To be honest I don't want people to remember me "for the beautyful code I wrote" - remember, any code could probably always be rewritten in a better way - but for the overall result I got with it.

To me CPP is the best language that fits me so far and my vision and honestly for the kind of programming/results we are working on/get I don't think there's really anything that much better that fits.

Sure if I'd be doing web appls I'd be using PHP and/or maybe Ruby and/or something else because clearly CPP is not designed to work with that kind of thing.

And maybe for some other applications/environements there's something a bit better that fits like 'for example' to put data in/out a DB you use SQL not writing/read bytes with a read() directly from a TCP socket ( altough, in the end, that is exactly what happens at some level ).

In the end of the day I am still convinced that before ANY lanugage MOST important is "a good OS and a good set of APIs and a good documentation and a good compiler", documentation ( about the thing you are working on ) in my opinion is maybe the most important one.

But then again 'look at the results, not just at the language' then if you want my opinion about "most impressive stuff" then it's going to be 'those mad that make incredible wonders in ASM on a VIC20 in 3.5K' .. now that is for me 'impressive code'.
Giles the billy goat
"Baa"
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27259
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: Thread about the languages ( another one ? )

Post by gilesgoat »

adam wrote:i've met a few clojure fans, mostly working for a big mobile manufacturer that does a lot of java, i'm guessing these jvm languages are a bit of a reaction to the verboseness of java, fortunately i think they're allowed to use it at work. another factor is probably the popularity of java... well the widespread use of java might be more accurate, lots of jobs, is top of the list sometimes

http://jobstractor.com/monthly-stats

this is just jobs advertised on twitter though, php is number 1, objective c high up there and it's also the best paid apparently, for a junior anyway
I think that statistic 'it's a bit odd', I was wondering "why so many requests for Obj-C" ? if you look at them almost all of them seems to mean "we want an iOS developer for making iOS stuff" which, you can PERFECTLY do in CPP as well, I mean yes you need to know SOME Obj-C but you don't necessarely need to do all in Obj-C.

I can't see much about 'industrial stuff' ( machinery/etc/control applications/etc. ) I am sure there's ton of stuff still running in C/CPP there if not more exotic stuff and/or quite possibly 8051 asm as well :lol:

Nobody needs any more a PLC programmer and/or a CNC machine programmer :?:
Giles the billy goat
"Baa"
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Re: Thread about the languages ( another one ? )

Post by gravy »

This is all of the languages I've written more than a couple of programs in that have been bigger than a screen long :) Actually it's all stuff I got paid for in one way of another.
  • 6502
  • C++
    • That was a bit odd. First high level language was C++ in 1989 :) The Zortech compiler to be precise. A happy accident, I had to write some data cooking utility code for a NES game I was working on so picked up the C++ compiler thinking it was a C one :)
  • 68k
  • 65816
  • SH2
  • C
    • Another odd one. Came to this pretty late. I did some Saturn work and it didn't have a C++ compiler so it was C instead. And primitive C at that, no need for function prototypes was particularly horrible.
  • MIPS
  • Perl
  • HTML
  • PHP
  • Ruby / Rails
  • Objective C
    • With some of the newer syntactic sugar and other features I'm starting to like this. Extremely loose coupling with an amount of type safeness is pretty nice. Still don't like some of it, message receiver declarations just look ugly :D
On top of that, for fun mostly
  • Pascal
  • Forth
  • z80
  • x86
  • lisp
  • C#
  • VHDL
  • Javascript
I'd say Ruby's had the biggest influence on me. It's given me a much better idea of OO than C++'s fairly limited repertoire and introduced me to things like closures. In turn that's changed a lot of ways I end up phrasing things in other languages which is cool :)

There's been a lot of studies into whether your vocabulary or the language you speak influences the way you think. It's pretty well accepted that there is a link. I think the same hypothesis can be applied to programming.

More is definitely better, it means you have a bigger toolbox of approaches to draw on.
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Re: Thread about the languages ( another one ? )

Post by gravy »

gilesgoat wrote: I think that statistic 'it's a bit odd', I was wondering "why so many requests for Obj-C" ? if you look at them almost all of them seems to mean "we want an iOS developer for making iOS stuff" which, you can PERFECTLY do in CPP as well, I mean yes you need to know SOME Obj-C but you don't necessarely need to do all in Obj-C.
That's not right. OpenGL games? Yep. All other apps, definitely not and I'd say most Apps are non OpenGL ones.
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27259
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: Thread about the languages ( another one ? )

Post by gilesgoat »

gravy wrote:
gilesgoat wrote: I think that statistic 'it's a bit odd', I was wondering "why so many requests for Obj-C" ? if you look at them almost all of them seems to mean "we want an iOS developer for making iOS stuff" which, you can PERFECTLY do in CPP as well, I mean yes you need to know SOME Obj-C but you don't necessarely need to do all in Obj-C.
That's not right. OpenGL games? Yep. All other apps, definitely not and I'd say most Apps are non OpenGL ones.
Ah yes true, forgot we don't use much at all UI elements or such of iOS.
Giles the billy goat
"Baa"
adam
Baaaaaa!
Baaaaaa!
Posts: 4418
Joined: Sat Jun 24, 2006 9:15 pm 0

Re: Thread about the languages ( another one ? )

Post by adam »

i see a lot of jobs for cnc programmers advertised, in local newspapers etc mostly, they often want a combined programmer/operator, or advertise for an operator who can debug code
User avatar
venusian
Baaaaaaa!
Baaaaaaa!
Posts: 6653
Joined: Wed Nov 06, 2002 2:22 pm 0
Location: South Gloucestershire

Re: Thread about the languages ( another one ? )

Post by venusian »

That sounds dangerous. Had assumed CNC machines were operator programmable only in the same way that video recorders are programmable. At what level are they programmed, and what happen when they crash? Burn holes in the operator? "No Mr Bond, I expect you to cast that pointer".
adam
Baaaaaa!
Baaaaaa!
Posts: 4418
Joined: Sat Jun 24, 2006 9:15 pm 0

Re: Thread about the languages ( another one ? )

Post by adam »

i would think it's writing g code, & if a machine is cutting at the wrong speed for instance the operator would need to be able to edit the code so it doesn't
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27259
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: Thread about the languages ( another one ? )

Post by gilesgoat »

venusian wrote:That sounds dangerous. Had assumed CNC machines were operator programmable only in the same way that video recorders are programmable. At what level are they programmed, and what happen when they crash? Burn holes in the operator? "No Mr Bond, I expect you to cast that pointer".
They can be programmed at various levels, including and especially the one where "oops I set a too high speed for this bit and/or a wrong attack angle and I destoryed a 300 pounds tungsten-carbide-diamond bit".

That's why you need to know well what you are doing.

Someone has to test/do that kind of thing maybe before it can present you a different 'programming level' where some mistakes can't ( or should not ) be possible.
Giles the billy goat
"Baa"
Post Reply