Foot shooting
Feb 04, 2009 by
libjpn
Slart mentioned shooting oneself in the foot, which started one of those searches for something I remembered which was this.
How to Shoot Yourself In the Foot Using Any Programming Language
The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you're currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas.
370 JCL
You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.
Ada
After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream, and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type.
APL
You shoot yourself in the foot, then spend all day figuring out how to do it in fewer characters.
ASP.NET
Find a gun, it falls apart. Put it back together, it falls apart again. You try using the .GUN Framework, it falls apart. You stab yourself in the foot instead.
Assembly
You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. After that's done, you pull the trigger, the gun beeps several times, then crashes.
brainfuck
Just looking at the gun gives you a migrane, so forget about actually shooting it.
BASIC
Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.
C
You try to shoot yourself in the foot, but find out the the gun is actually a howitzer cannon.
C++
You accidentally create a dozen clones of yourself and shoot them all in the foot. Emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."
COBOL
Using a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER. on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied.
Concurrent Euclid
You shoot yourself in somebody else's foot.
CSS
You shoot your right foot with one hand, then switch hands to shoot your left foot but you realize that the gun has turned into a banana.
DOS Batch
You aim the gun at your foot and pull the trigger, but only a weak gust of warm air hits your foot.
Forth
Foot in yourself shoot.
FORTRAN
You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-handling ability.
HyperTalk
Put the first bullet of the gun into the foot of the left leg of you.
Answer the result.
Java
After importing java.awt.right.foot.* and java.awt.gun.right.hand.*, and writing the classes and methods of those classes needed, you've forgotten what the hell you're doing.
JavaScript
You've perfected a robust, rich user experience for shooting yourself in the foot. You then find that bullets are disabled on your gun.
LISP
You shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds...
Machine Language
Before you can shoot yourself in the foot you must disassemble the gun at the atomic level and then reassemble it. After you do this, you find that the bullets require a special operator so the gun doesn't work.
Modula-2
After realizing that you can't actually accomplish anything in this language, you shoot yourself in the head.
Motif
You spend days writing a UIL description of your foot, the trajectory, the bullet, and the intricate scrollwork on the ivory handles of the gun. When you finally get around to pulling the trigger, the gun jams.
Paradox
Not only can you shoot yourself in the foot, your users can too.
Pascal
The compiler won't let you shoot yourself in the foot.
Perl
You shoot yourself in the foot, but nobody can understand how you did it. Six months later, neither can you.
PHP
You shoot yourself in the foot with a gun made with pieces from 300 other guns.
PL/I
You discover 6,752 different guns for shooting yourself in the foot. Before you can decide which one to use, you starve to death.
Prolog
You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn't allow it to explain.
Python
You try to shoot yourself in the foot but you just keep hitting the whitespace between your toes.
Revelation
You'll be able to shoot yourself in the foot just as soon as you figure out what all these bullets are for.
RPG
First you define your gun, bullet, and firing pin. Then, you define your foot, toes, and toenails. Then, you open chamber and load the gun. Then, you cock it. Now you're finally ready to shoot yourself in the foot.
Ruby
Your foot is ready to be shot in roughly five minutes, but you just can't find anywhere to shoot it.
SNOBOL
If you succeed, shoot yourself in the left foot.
If you fail, shoot yourself in the right foot.
SQL
SELECT @ammo:=bullet FROM gun WHERE trigger = 'PULLED';
INSERT INTO leg (foot) VALUES (@ammo);
UNIX
% ls
foot.c foot.h foot.o toe.c toe.o
% rm * .o
rm: .o: No such file or directory
% ls
%
Visual BASIC
You'll shoot yourself in the foot, but you'll have so much fun doing it that you won't care.
Visual BASIC.NET
You spend a fortune on a high-powered, self-cleaning, self-aiming, automatic handgun with unlimited ammo, only to realize it takes a year to pull the trigger.
Visual FoxPro
You mock other sharpshooters for not being able to shoot both feet at once, but when you try to do it yourself you realize that you can't properly handle the Microsoft.gun ActiveX.
I don't pretend to understand the bulk of them, but it probably says something about me that I would like to. I'm now wondering if you could learn programming in some language simply by understanding a set of jokes like this
Comments
Feb 04, 2009, 10:33:42 JayS wrote:
jeez,
I've written something in 19 of these languages and read source in a few of the others.
A couple don't ring true, but many are fair.
Feb 04, 2009, 10:36:38 Turbulence wrote:
[i]I don't pretend to understand the bulk of them, but it probably says something about me that I would like to.[/i]
The jokes don't have all that much to do with the fundamentals of most of these languages. Learning languages is lots of fun and computer languages are much easier than natural languages, but most of these languages are very similar.
Most Computer Science departments offer a class called something like "(Introduction to) Programming Languages" that covers a variety of different languages. Looking through a text for one of those classes might interest you. Unfortunately, many (but not all) tend to focus heavily on either formal semantics or implementation, both of which would bore anyone who wasn't a CS grad student.
By the way, this list reads like something written by practitioners who with very little academic background. Languages like Haskell, Erlang, ML, and Eiffel really do bring some novel ideas that you don't find well explored in the languages listed here.
[i]I'm now wondering if you could learn programming in some language simply by understanding a set of jokes like this[/i]
No, you really couldn't. Sorry to crush your hopes and dreams ;-(
Really, learning one interesting programming language is more than enough to get people thinking. You might enjoy Structure and Interpretation of Computer Programs, which is available for free online.
Feb 04, 2009, 10:46:27 Turbulence wrote:
Oh, and one other thing: these languages are all equally powerful. There is a mathematical theory by which one can rank the expressive power of languages and all of the ones listed above are equally powerful. Now, any of these languages might be well or ill suited to any particular task at hand, and some will be spectacularly ill suited to almost any task.
Feb 04, 2009, 11:06:52 JayS wrote:
[i]"By the way, this list reads like something written by practitioners who with very little academic background.[/i]
Or someone a bit older than you turb. In my day PL/1 and Algol were modern, and Pascal was new. But some of the trendy languages of academia of the past decade or so are missing. Did Eiffel capture an academic audience? It seemed like commercial marketing hype to me.
Feb 04, 2009, 11:22:23 John Thullen wrote:
If these are languages, how come I can't understand a word of it?
I can't say why, and I have no "data" to back this up, but I contend computers and cellphones have subtracted from productivity.
Whatever "productivity" is.
I watch the winter sun shine through the branches yesterday mrning and then I went to work.
Somebody prove to me which of the those activities was more productive.
But speak a real language.
Feb 04, 2009, 11:53:37 Turbulence wrote:
[i]Did Eiffel capture an academic audience? It seemed like commercial marketing hype to me.[/i]
I'd argue that Eiffel has a lot more users and interest in the academic world than the commercial world. Bertran Meyer really really wishes that Eiffel was a commercial success, but AFAIK, it has always been a commercial flop.
[i]Somebody prove to me which of the those activities was more productive.[/i]
This is a side point, but not all programs are made for productive work. The best programmers understand that their programs are meant to be read primarily by other human beings and only secondarily to be processed by machines. That makes programming languages another medium of expression like a canvas with its brushes or molten glass or clay. Different mediums offer different possibilities for artistic expression. Now, most programs don't express anything particularly interesting in terms of art, just like most documents aren't great or even middling literature. But that doesn't mean that the crystallized thought shown in the best programs is any less beautiful than your winter sun shine scene to those that can appreciate it.
Feb 04, 2009, 12:34:03 justinslot wrote:
Speaking of shooting one's self in the foot--I'm finding the Darren Hutchinson run-in to be pretty amusing. Especially the "I'm not a professional blogger" bit.
Feb 04, 2009, 13:45:44 tgott wrote:
JT: I have no proof whatsoever, but I will most definitely go with watching the winter sun shine through the branches, but then, I am a hopeless romantic. (Hope you caught a glimpse of Cardinal or two while you were doing so.)
Wednesday is my day off, and I have a slate full of errands to do, hoping to be productive in those endeavors. But I will make sure to look at my home office window, which provides the best view of the backyard, and "watch the winter sun shine through the branches," a nice lyrical phrase, if I may add.
Missed seeing your tag line here and over at the mothership the last few days.
Cheers.
---bedtimeforbonzo
Feb 04, 2009, 17:45:10 libjpn wrote:
Not a professional blogger Hutchinson has a new post up
http://dissentingjustice.bl...
Like someone said in the comments of the earlier post, I'm glad he's not my lawyer.
Feb 04, 2009, 22:59:01 john miller wrote:
JT, second everything you say.
When I was in college you could tell who the computer students were because they were always walking around with a two foot high pile of punch cards. Just watching them convinced me I didn't want to get into that line of work.
I have no regrets for that decision. This list helps confirm its wisdom.
Feb 05, 2009, 00:51:29 OCSteve wrote:
I got a few chuckles out of that, so thanks. The C/C++ blurbs ring especially true.
The SQL one is actually T/SQL. So I’ll translate to PL/SQL for my contribution:
DECLARE
l_sAmmo VARCHAR2(10);
BEGIN
SELECT bullet INTO l_sAmmo FROM gun WHERE trigger = 'PULLED';
INSERT INTO leg (foot) VALUES (l_sAmmo);
EXCEPTION
WHEN no_data_found THEN
RAISE_APPLICATION_ERROR (-20000, ‘What the hell happened to the ammo [i]now[/i]?’);
WHEN too_many_rows THEN
RAISE_APPLICATION_ERROR (-20001, ‘Wait – I have more than one bullet?’);
WHEN value_error THEN
RAISE_APPLICATION_ERROR (-20002, ‘Bullet too large for gun.’);
WHEN dup_val_on_index THEN
RAISE_APPLICATION_ERROR (-20003, ‘That foot has already been shot.’);
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR (-20004, ‘F* this! Give me a damned knife.’);
END;
Feb 05, 2009, 01:06:24 DonaldJ wrote:
John Miller--
I apologized to you for jumping on you too hard in one of the Iraq threads. I mention it here because you might not have seen it, as I was away from ObiWi for a day and the thread is almost dead now.
Feb 05, 2009, 01:13:52 OCSteve wrote:
Dammit – it stole my whitespace. I’m really anal about blocking in my code…
Feb 05, 2009, 02:51:58 Turbulence wrote:
[i]When I was in college you could tell who the computer students were because they were always walking around with a two foot high pile of punch cards. Just watching them convinced me I didn't want to get into that line of work.[/i]
You'd be surprised about how similar some of those areas are to counseling. The best technical managers I've seen are engineering graduates who approach their work like counselors. They know how to listen, how to ferret out information from the quiet folks, how to politely blow off opinions from the loud folks, how to mediate the inevitable conflicts all while making everyone feel respected and validated.
Boundaries aren't always so clear and distinct.
Feb 05, 2009, 03:20:19 JakeB wrote:
That gave me a better laugh than I usually get in the morning.
I've only written in a few of these languages but it rings true for me, especially Java, which seems to affect me somewhat like [url="http://en.wikipedia.org/wik...(disease)"]kuru[/url].
Feb 05, 2009, 03:21:26 JakeB wrote:
Even when just mentioning it in a comment and then trying to put in a url . . . .
Feb 05, 2009, 05:38:17 john miller wrote:
DJ, I did see it, and personally, I didn't feel an apology was necessary. I should have explained what I meant more like I did in the follow-up. Too often I am rushing through a comment.
Turb, I can't tell you how many couples I counseled where one of them, usually the male was involved with computers in one way or another.
As the 80's shifted into the 90's that diminished significantly. I attributed that to two things. The first is that computers were no longer seen as the province of the nerds and non-emotional people. And secondly, everybody (except my wife) was becoming more at ease with at least using computers (if not fully comprehending how they worked or things like languages) and so both people in a relationship were staring to be able to talk more about things.
FWIW, the two other professions that produced significant couple counseling were physicians and airline pilots. The stories I could tell.
Feb 05, 2009, 06:39:43 Jeff wrote:
As a COBOL programmer, I note with some amusement that COBOL is one of the few languages where you do, in fact, shoot yourself in the foot.
Many of the others (APL, PL/1, JAVA to name a few) match my experience with them.
Feb 05, 2009, 09:54:07 justinslot wrote:
Can we all start calling her Hilz now?
Feb 05, 2009, 22:27:24 tgott wrote:
"When I was in college you could tell who the computer students were because they were always walking around with a two foot high pile of punch cards. Just watching them convinced me I didn't want to get into that line of work."
I knew we were kindred spirits, Mr. Miller.
When I was in college, the main majors at the university I attended were: Journalism & Communications (mine); Dance -- Ballet and Jazz (which created a nice dating pool); Business (which, ironically enough, was that of my college sweetheart in my junior and senior years); Computer Science (the group that never seemed to be enjoying their four years away from home as much as the rest of us, as John noted).
Naturally, I have a soft spot for liberal arts majors. I have always found them, as a rule, to be the most easy to strike up and carry a conversation wtih -- and not take things too seriously, but certainly serious enough, or debate every last point until the bitter end.
I would agree with Turb when he says: "I've seen engineering graduates who approach their work like counselors. They know how to listen, how to ferret out information from the quiet folks, how to politely blow off opinions from the loud folks, how to mediate the inevitable conflicts all while making everyone feel respected and validated."
My son, even though he is only 10, has the mind of an engineer.
As I write this in the basement den, wires and batteries and shells of remote-control cars that he has taken apart, and God-only-knows-what-else, are strewn all over the floor. It's like one giant minefield.
I think he does this so Dad must walk it every time he must head upstairs (of course, the real reason is he wants to be closer to Pop while he's doing his thing and I'm doing mine, and the TiO Dads know how great that feels inside.
Never mind that -- in the adjoining room (the actual "basement" part of the basement) Danny has a full-blown workshop and desk, complete with tools of every size and shape, saws, drills, and more and more wiring equipment, and all sorts of things we have collected from our trips to his favorite place, the local junk yard.
I have no clue what most of this stuff does and am amazed at the things his 10-year-old mind puts together.
Yet even at his young age, and this is why I think he will go far in this life, unlike his Old Man, he can, to use Turb's words, "know how to listen, how to ferret out information" and "politely (well, not always so politely -- he is 10 after all) blow off opinions from the loud folks, how to mediate" (which I have seen him do, diplomatically, with his young friends, most of whom don't have a clue, from the looks on their faces, as to what his latest invention does or how it was built).
The reason I bring up Danny is, even if he weren't my son, he's exactly what I'd want an engineer I'd have to work with in any capacity to be: Reasoned. Humble. Passionate. Patient. And, most of all, not condescending.
Other than my son -- and my retired neighbor "Mr. Bill," who was a top-flight engineer at DuPont and Gore (both, of course, companies based out of my beloved Delaware) and who has taken Danny under his wing like a grandson -- I don't have any friends who are engineers; and if they are like the blessedly-patient and good-humored Mr. Bill, it is my loss.
(Mr. Bill gave Danny a transistor radio a couple summers back; apparently they still give out such things when you open up a Certificate of Deposit. Within two days, Danny had taken the entire thing apart and used the inner workings for something he was making. I saw Mr. Bill a day or two later, told him what Danny had done and big, white-hared Mr. Bill laughed, that deep, Santa Claus laugh of his, and said, "Yeah, I knew he'd do that.
"Tony," Mr. Bill said, "you just watch -- that boy is going to go places . . . You'd better be saving up for his college.")
Feb 05, 2009, 22:28:50 tgott wrote:
I regularly come into contact with engineers on my job.
I'd say my success rate selling them is 30/70, which is actually better than all but one of the other five guys I run with.
Often times -- and as sales guys it's amazing how many times we can tell a person's profession just by listening to them for a few minutes -- when Rodney or Ray or Paul (not cocky, young Andrew, who is very analytical) have an engineer at their desk (we get many, being so near the home office of DuPont and Gore; their main plant and where Gore was actually founded is -- in fact lovely Mrs. Gore still buys trucks from us -- just 2 miles away from my store), I will watch, amused, as Mr. Macho, Ray, who fashions himself as a sort of urban warrior having grown up on the mean streets of Wilmington, insists on taking control of the customer (which is the key to sales, of course, but which is definitely not the way to sell an engineer); Rodney, a cool black guy and someone I consider a friend (unlike Ray) who was born in Amsterdam, grew up in Jamaica, man, moved to Florida, then New York and settled in Delaware, which, ironically, was settled by the Dutch, has no patience with most folks, and definitely not with most engineers who land on the used-car lot; my other good friend, Paul, who, as he tells everybody he meets, "I've been doing this for 30 years, 'G' (He calls everybody 'G' including himself) and is a kindred spirt as a liberal Democrat and lover of cats and Eastern European women -- he was born in Lativa during the Stalin Era -- could not sell most engineers if his life depended on it: for one thing, he's so old-school I'm not sure after 5 years of working with G if he knows what a Subaru, Honda or Toyota, especially a Prius, look like -- G knows Buicks, though. And for another thing, his mind is much too scattershot, much more so, than yours truly, to connect with a detail-oriented, how-the-thing-was-made, how-much-torque-the-Accord-has-vs.-the-Camry, thanks-for-your-time-all-217-minutes-of-it-but-I'm-going-to-go-home-and-check-the-Inernet-again-to-see-what-Kelly-Edmunds-and-Consumer-Reports-says-and-maybe-I'll-come-back-in-3-weeks buyer.
(OK, I'm thinking in my head at that point -- I won't hold my breath: Enjoy that Subaru.)
Sure, I've sold plenty of engineers out of the 1,000-some cars I've sold in the past 5 years -- as I said we're a stone throw's away from Gore and DuPont, and DuPont=Delaware (ever since I was a kid and my paper route of 120-some newspapers consisted of 40-some DuPonters; in the 60's and 70's, DuPont practically owned Delaware).
I've sold fewer lawyers, although three of my best frends are attorneys -- lawyers tend to be high-end import buyers, and while our lot carries imports, my dealership's auction buyer leans toward Merceds and BMWs, and older makes (circa 2003-2006), than my rich lawyer friends, all three of whom have their own firm and have 10 or 20 years on me, would buy.
But being a store whose New side's flagship is Chevy and Hyundai (my wife drives a very nice 2006 Azera, which your average snooty Lexus or Acura or Infiniti buyer would not even consider, and I drive, ironically, a 1992 F150) out of our 80-car inventory the mix tends to be 40 percent Chevy cars and trucks, 20 percent Hyundai cars and SUVs, 20 percent imports, 10 percent Ford trucks, 10 percent Dodge trucks.
I work within a 10-mile radius of a GM plant and a Chrysler plant, which, sadly, was recently shut down and 8,000 jobs were lost in the community.
So our buyers tend to be domestic and blue-collar, salt-of-the-earth peeps. They are our bread-and-butter.
Especially truck buyers -- our store has always been known for two things on the preowned side: good trucks and top-flight, practically, if not, mint Corvettes.
I love truck buyers, whether they're good ol' farm boys or just good od' boys, landscapers, rednecks, family guys who consider themselves weekend warriors. I love truck buyers.
Talk their language. Feel their joy. Feel their pain. We laugh easily. We do business easily, often on a handshake deal where Ol' Crazy Tom Simpkins comes in the next day and picks up the Silverado I never bothered to put the sold signon ; we don't need no stink' deposit.
We also do a huge business with every stripe of worker in the banking business -- Delaware being the Credit Card Capital of the World, with our friendly laws toward that industry. And on the whole, these folks are good to do business with.
Engineers -- they make the things that make the world go, and I hope my son grows up to be a good one.
I just won't bet on him buying his second car from me, after the first one that Dad got him is put out to pasture.
---bedtimeforbonzo
P.S. Jake: How did you do on your exam?
Feb 05, 2009, 23:19:41 Slartibartfast wrote:
I have to say the UNIX part gave me a chuckle, but UNIX isn't a language.
awk script, though, might be a hoot.
Feb 05, 2009, 23:23:15 Slartibartfast wrote:
For jollies, though, JOVIAL really ought to be added to the list.
Feb 06, 2009, 00:02:52 OCSteve wrote:
John: [i]I can't tell you how many couples I counseled where one of them, usually the male was involved with computers in one way or another.[/i]
I can totally understand that as I lived through it. Money and time…
Most couples have trouble over how money gets spent. One of the times I actually did call the future right – I knew that PC thing was going to be hot. And I knew I had to have one to really learn about them. After much fighting and bickering I spent (financed) $4300 for my first PC. An XT (8 Mhz CPU, Math Coprocessor) with 512KB RAM, a 10MB hard drive, and a CGA monitor (4 colors! Wee!). $4300 is a lot of money today – it was a small fortune to us back then… And of course long before it was paid off it was obsolete and I had to have a newer model that could handle the language compilers I needed. So we were perpetually in debt due to me having to have a decent PC to teach myself programming.
Then there was the time investment. Sitting in front of the computer night after night (“Are you coming to bed yet?!?”). When I was in school, sitting in the computer lab every weekend… Then the jobs and the expectation of 80 hour weeks [i]before[/i] the dot-com bubble even really got going. Nights and weekends and holidays, weeks at a time onsite at a customers on the other side of the country…
All that takes a toll on a marriage. In the end it was all worth it and we made it through. But I can certainly blame some rocky years on computers and my choice of careers…
Feb 06, 2009, 00:45:00 Slartibartfast wrote:
I didn't do programming on a PC until I installed a version of Linux on my old 486, back in 1996 or so.
But then: boy, howdy. By then my 486 was obsolete, but I actually got a ton of work done on it. Eventually I stopped having it be dual-boot because the Windoze part of it was practically worthless.
Feb 06, 2009, 08:34:18 Jeff wrote:
[i]Computer Science (the group that never seemed to be enjoying their four years away from home as much as the rest of us, as John noted)[/i]
I had a great time in college (it would have been better if Agriculture was the most-populated major). it was the Arckies (Architecture Majors) who had their souls sucked out through a straw at our school.
Feb 06, 2009, 12:58:06 JakeB wrote:
btfb--
Thanks for asking! I don't know yet . . . . I find the tests unnerving, though, because it always takes at least 40 minutes or so in this evening slot (8-10 pm) for my mind to switch from programming to statistics. I spend the first hour of the exam vacillating between terror and resigned despair, then the third time or so I look at something it starts to make sense. In the end I felt like I had most of it right, but it's anxiety-provoking.
Feb 06, 2009, 12:58:12 DaveC wrote:
When I first started programming I bought a Lear-Siegler terminal, and I could dial in (300 baud acoustic coupler) to my company's Data General Nova 3D and get into TAC Business Basic. My first Assembly was a hack for a band printer where you made a new "user keyword", STMD x,x , I believe, and re-sysgened the BASIC program (had to do that at the office under RDOS command line).
My long term job I started using DPC/OS, which a printer and disk drive server for a box using multiple single board Z80 computers. I did a little generic Z80/8080 assembly then, but mostly used Digital Research CBASIC.
Then moved up to the really awesome for the time Heath/Zenith Z-100 desktop computer that had a motherboard with like 5 S100 slots, 8 color video, two processor chips (8085 and 8086) and used Digital Research CB86 CBASIC (versions for both CPM-86 and DOS). This supported CPM, CPM-86, and MSDOS 2.1. I started my 8087 math chip assembly projects on this.
The Zenith Z-150 was an IBM PC clone that had an add-on Z319 board you could do 8 color video like the Z-100. My video optimizations for the Z100/Z150(319) were my first foray into the reducing the number of executed instructions for 8088/8086 code, which is what I did for most of my career. On some projects the main code was FORTRAN or C, so I would mess around with the startup code to mess around with stack and heap size and redirect exceptions. But much of my debugging data analysis and utility programs were Microsoft Compiled BASIC 4.5? and 7.0
The old Analog Devices 2181 chips and PIC microprocessors pretty much had to be programmed in assembly, although there were a couple of PICBASIC compilers (good mainly for reading the assembly listings and examining the memory page layouts).
Now I work on assembly language for an antique processor 68HZ16, and do my debugging and data analysis utilities with PowerBASIC and EZGUI, both of which I highly recommend.
So while it may be a niche thing, I'd say a combination of assembly for specific chip functionality and BASIC for quick and forgiving coding is not a bad way to go.
Feb 06, 2009, 13:18:41 DaveC wrote:
Not that I necessarily have time to more vigorously defend Assembly/BASIC and DOS/Windows versus C and UNIX, but the whole argument that has been going on for years about processor dependent languages and OS versus "universal" language/OS seems to me not to be settled in favor of the universalists.
Feb 06, 2009, 14:00:56 JakeB wrote:
This all reminds me that those of you who haven't seen [url=http://www.jwz.org/doc/wors...]'The Rise of "Worse is Better"'[/url] before might enjoy it.
Feb 06, 2009, 22:23:48 Slartibartfast wrote:
I also have programmed in 8080/Z80/8085 assembly. I didn't consider those programs "computer programs" because they were basically running on a bare microprocessor board with some RAM and EEPROM, no disk drive, and no display.
So, my programming goes back a lot further than 1995 or so, but I was programming VAX 11/780s, 808x microprocessors, CDC computers and, later, other DEC offerings like the VAX 8600. Only the micro-p boards I did in assembly; everything else was mainframe and FORTRAN. C I taught myself later in life. Oh, and I did some Pascal programming, but that's an embarrassing part of my life that I'd rather not talk about.
I think I've said this before, but there are Z80s still in use in military targeting systems. You don't monkey with the code, though, because it's in JOVIAL. And very few people speak JOVIAL anymore, or have access to a compiler.
Feb 07, 2009, 12:41:47 Turbulence wrote:
[i]Not that I necessarily have time to more vigorously defend Assembly/BASIC and DOS/Windows versus C and UNIX, but the whole argument that has been going on for years about processor dependent languages and OS versus "universal" language/OS seems to me not to be settled in favor of the universalists.[/i]
I think you're wrong. You can write good assembler code for an 8-bit or 16-bit chip. Writing good assembler for a 64-bit superscalar chip with multiple execution units, a long pipeline and very high latency memory accesses is extraordinarily difficult. That's we have software do the work for us: because we can't see see a few hundred instructions ahead and plot an instruction sequence so as to minimize pipeline stalls. In other words, if you're doing anything involving even remotely high performance work or anything that uses modern chips, you're going to be using a compiler.
Then again, if I can write 1000 lines of high level code but you need to write a million lines to do the same job, I'm pretty sure I win automatically. It is possible to get a thousand lines of code bug free, but there's no way you're ever going to get a million lines of code even close to bug free without requiring an obscene amount of time and money.
Feb 07, 2009, 22:34:41 DaveC wrote:
I'm not saying that assembly should be used for everything. I love my current BASIC because it does conversions for me between different kinds of numbers, and I can use 16 bit, 32 bit, floating point numbers where they make sense and the proper conversions will be done for me on built-in functions, instead of me having to worry about a 16 bit variable being dereferenced as a 32 bit number, etc.
Feb 08, 2009, 00:46:11 Turbulence wrote:
DaveC, are you now claiming that BASIC is not a "universalist" language?
Feb 10, 2009, 11:10:31 DaveC wrote:
BASIC is a hacker's language. The various versions are similar but not portable. I use it because it can be quick and dirty. That is, some people say "if it's not worth doing right, then it's not worth doing at all". I say that's a reason why in some organizations very valuable one-off utility and data analysis programs never get written.
Feb 10, 2009, 12:25:03 Turbulence wrote:
[i]The various versions are similar but not portable. [/i]
That just means that it is a shitty language. The only excuse for non-portable high level languages these days is awesome performance and BASIC's performance sucks.
[i]I use it because it can be quick and dirty.[/i]
There are lots of languages that are quick and dirty, and many of them are faster than BASIC, have better libraries, and make it easier to write comprehensible code.
Feb 12, 2009, 20:02:01 Slartibartfast wrote:
BASIC is a hacker's language? Really?
I always found it clumsy and limited. It does have the bonus of being cheap to actually run programs on most systems, but I'd take C over BASIC any day. Right now there aren't many platforms that you can't run C on for free, and C does bit-level analysis a lot better than BASIC does, I believe.
Or C++, but C will do all of the lower-level stuff that C++ does, I think.
Que? I thought real hackers used OS scripts. That probably says I'm not a hacker really loud, but I'm not too ashamed to admit that.
Feb 12, 2009, 20:04:17 Slartibartfast wrote:
NB: I'm not a terribly talented programmer, but there isn't much that I know how to do that I can't write a program around. It's just that the resulting program will likely violate most programmer's sense of decorum, and will almost certainly violate someone's standard practices.
Still: no GOTOs. I always have that to point to.
Log in here
Add Comment