Old-school programming techniques you probably don't miss
heater
Posts: 3,370
Just a heads up to a nice article describing "obsolete" programming techniques for the young'ns.
www.computerworld.com/action/article.do?command=viewArticleBasic&taxonomyName=Development&articleId=9132061&taxonomyId=11&pageNumber=1
To quote:
"11 skills and tactics that every programmer once needed to master ... and today can blissfully forget"
Amusing because us Propeller Heads HAVE to use all of those techniques all the time and we love it[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
www.computerworld.com/action/article.do?command=viewArticleBasic&taxonomyName=Development&articleId=9132061&taxonomyId=11&pageNumber=1
To quote:
"11 skills and tactics that every programmer once needed to master ... and today can blissfully forget"
Amusing because us Propeller Heads HAVE to use all of those techniques all the time and we love it[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Comments
I've got my own handcoded shellsort doing great service every day, and it is still *much* faster than dropping the data into any of the .net supplied methods. It uses GOTO and the writer made no apologies for that - as he says, it simply works faster that way.
My 13 year old son recently asked me for some tips on getting started on programming. And I started by showing him .net, but it all got too complicated to explain. It was easier to go back to the simpler languages and start from there. A bit like the way Physics is taught in schools, you start with what people knew in 1850, and then you build on it one decade at a time. It makes more sense that way.
Writing machine code and computer code the 'old skool' way is good brain exercise, a bit like doing crosswords (but more productive!). And exercising the brain is a good way to stave off dementia!
Post Edited (Dr_Acula (James Moxham)) : 4/30/2009 7:33:07 AM GMT
I nearly choked on my coffee when I read how C++ had "eliminated the need for structured programming"!
I'm guessing that this article was originally intended for publication on April 1, but that some young sub-editor failed to see the joke.
Ross.
self-modifying code ? check !
goto all over the place ? check !
spaghetti ? and also penne, rigatoni usw. ? check !
no stack ? check !
And I am still a night owl from computer access midnight till dawn.
Do you know how any programmers were around at 2am on a Sunday morning when the nightclub next door caught fire
And I remember issuing patches on the 29th Feb 1976 to customers over the phone because the computer would not accept the 29th (not my code thankfully)
While I am at it, look at the·ICL System Ten Instruction set and 20 CPU's (hardware timeslicing)·http://members.iinet.net.au/~daveb/Sys-10.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 4/30/2009 9:34:16 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I was reminded of this recently trying to write some simple app using the Qt library. Qt is great but you need to know a lot about C++ first, then you need to write a whole class or classes to get "Hello World" up. No one liners here. Not to mention the fuss with make files and qmake for Qt etc etc etc.
The Prop and Prop tool seem to be the about nearest we have to that now a days. I think it's a sin that all those millions of game consoles sold don't have even the rudimentary programmability for their owners of a ZX81.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
-Phil
to make the same from first principles. Even those who can cook probably don't have much
of an inkling when it comes to making their own cooking utensils form a pile of ore.
It's all a matter of needing to know something or other so I can understand that coders these
days would call Sort() rather than wondering about the intricacies of how to roll their own. I
do the same when using MSComm32 in VB, or using the TV Driver in Spin
That "I" for integer / control loop indexing is so ingrained in I get confused if I see it used
for anything else !
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
No, your professors are not out of touch - they are teaching you fundamental things you will need to understand (or at least be aware of) to be something more than just another code monkey (http://en.wikipedia.org/wiki/Code_monkey).
Maybe not very interesting, and certainly not very sexy - but necessary.
Ross.
Remembering the experience, I did the same thing for TCP when I got into that. Most of my VB apps run without running an installer because their only dependency is the VB6 runtime, which has been on every XP-up box I've ever seen out of the box.
Of course, this only reinforces your point about being able to move beneath the hood...
I definitely don't miss Hungarian notation. I always refused to use it.
They can complain about "Enter 1 to Add Records, 2 to Edit Records, 3 to Delete Records" all they want, but at my wife's vet practice we still use archaic software with that kind of interface and our employees can fly on that software. If we brought in a mouse-based system their productivity would plummet. If someone is using a program eight hours a day it should be 100% keyboard-based.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
localroger: I'd love a copy. I gave up with VBnet and still use VB6 with mscomm. cluso@bluemagic.biz
hippy: Nice to see you still lurking about.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
I'll give up Punch Cards when they pull them from my cold, dead hand [noparse];)[/noparse]
Roger
The big thing here is that businesses like ms like to push a new "coding" style with every language and to change languages quite often. So people has to re-buy tools and so on. And they do not care how much time it take for people to learn all those things.
I wanted to learn java some years ago, so I started coding an app (I wanted it multiplatform too) to manipulate my mass spectrometry files. It is still not perfect, not finished and has a lot of dead code. I still have to look for tutorials and API docs to know how to go forward. It has been almost 5 years. For someone who is not programming 8 h a day learning all those little things is quite a task. And I have been programming for some 20 years already.
I used to have my shellsort around, I do not like recursion that much .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Fortunately, I kept the stakes to a nickle.
Later I decided the active factors were probably price·and the nexus between INTC and MSFT with their various kickbacks to their users. It surely wasn't ease of use and orthogonal architecture.
the thing; you only need to get under the hood and work out how a provided component works when
it doesn't do what you want it to.
Most people here don't know how Spin bytecode works and don't suffer through that. Many I suspect
are happy to use what they are given and don't have any interest in how it works as long as it does.
That 'not reinventing the wheel' does lead to a problem though when the wheel doesn't exist in the
first place. For example C. Many people have said they'd like it, it's not an insurmountable task to
deliver it on the Propeller, but apart from a few hardy souls very few are involved in the effort to
make it a reality. There are many reasons for that; it's a small community, pressures of time and
other projects, lack of prerequisite knowledge, but I suspect that a lot of it is because people want
it delivered on a plate with zero effort on their part.
That I think is the real difference between now and back when computers were new. If you wanted
something you had to do it yourself. We seem to have lost something since then. Is it 'consumer
society', a dumbing down of of people's skills, or modern day laziness ? Maybe it's all too complex
to understand it ? I don't know, but the art of hacking ( in its good sense ), wanting to know how
things work, seems more lacking as time moves onwards. Innovators, experimenters and hackers
are seemingly becoming rarer by the day.
On C vs. Spin, I've noticed that people whose background is C tend to call Spin BASIC-like, and people whose background is BASIC tend to call Spin C-like. When you look at the math operators, the lack of memory protection, crappy string handling, and block comment structure, it's C-like. When you look at the syntax, the use of whitespace to delimit code blocks, the case insensitivity, the nonuse of curly braces, and the apostrophe comments it's BASIC-like. What it is is an efficient (and dangerous if you're not careful) language like C that is designed to be inviting for beginners like BASIC. Beginners often don't get how to do block indentation, so Spin makes them get it right or the code doesn't work. Spin uses objects and lacks GOTO, but its objects are permanent so issues like scope and lifespan don't muddy it up.
And then, as with early BASIC, Spin is a bit slow so it's complemented with the completely different and vastly more powerful PASM. I cut my teeth in professional programming with a similar combination, coding in MS Series 100 compiled BASIC (written for a non-IBM MS-DOS machine and having no non-DOS I/O functions at all) and 8086 ASM to get the stuff done BASIC was too slow or lacked functions for. (I had to do long string handling in ASM because, on rare occasions, BASIC would crash if you were manipulating a lot of long strings. The 8088 had a bug which would cause string copies to not be completed if they were interrupted, and this would corrupt the string heap. Whenever I mentioned this to other programmers they would shrug and say well, it doesn't happen very often; I took the trouble to code around it.) My projects used to run 10-20% ASM (in source), and with that experience the relationship between hub and cog memory seems perfectly natural and correct.
I cannot really imagine a task for the Prop which would be better served by C than Spin over PASM; I think the main reason for wanting C is that some people are so used to thinking in C that they'd rather not learn another model. But the Spin/PASM model was custom designed for the Prop's architecture, and for maximum versatility I think it's more useful to learn how the chip is meant to be used than to try and force it into a model that was meant for a much different architecture.
Playing devil's advocate on the C vs. Spin/PASM bit ... There is a lot of existing code written in C. Although it's not difficult to transliterate C code to Spin, it's time consuming at best. If compile-time macros are used a lot, it's downright annoying and error prone. It would be interesting to see what would happen with the Propeller if there were a C to Spin-bytecode compiler and a PBasic to Spin-bytecode compiler.
Only when it is critical do we really have to work from first principles and even then we are often never sure we've caught every nuance of what could go wrong. When not very critical we take pre-written code, be that MSComm32, a supplied Sort() routine or a Propeller Object from OBEX, and say that will be good enough. It's that difficult measure of deciding "what is good enough".
It's the same for hardware; we should ideally fit caps close to regulators, decoupling capacitors and fit current limiting resistors on I/O 'just in case', but we frequently skip doing so.
That's how we wrote a debug monitor for the 6809 very soon after the first chips landed in England.
A good into to the life of a programmer I guess....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
There are still NC machine shops that use 1" ASCII paper tape punchers and readers.
http://www.westnc.com/paper-tape-rolls.html
A new puncher is gonna run you about a grand, or so... Rolls of tape, which will hold about 170K, are $50 / 80, depending on oiled or not, mylar or not.
The punchers run about 70cps or so. I once put an 8K version of space invaders for the DOS PC, onto a paper tape roll. Still have it in the little blue can somewhere.
The bits got punched out of the tape. They, of course, fell into the "bit bucket" and are as far as I know the only real physical manifestation of "bits"! I've a little can full of "bits" somewhere too. It contains the "bits" from the invaders tape.
It's funny to see such progress then walk into a shop to watch an old AMADA NC punch, producing parts from a looped program, where the loop is literally the paper tape (oiled for sure) ends, secured so that it will feed through the reader over and over. That's a physical manifestation of a "program loop" then too!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!