- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
What do those variables fire?
10mm explosive tipped caseless hex codes. Standard light armour piercing round. Why?
Well do you see where your primary keys are? They're right under the primary heat exchangers.
Admin
In his late nineties, Eric started on his journey from being an engineer to being a programmer.
Admin
And where did "scientific programming" get defined as "The boat?"
Getting back to the requirements, and not just the prejudices: Where did VB get invalidated? What task was not achievable in VB.
You have to evaluate the requirements (both current and anticipated) of the task against the language you are developing in. Anything other than that objective comparison is just prejudice.
Admitting my prejudice, I'd probably have started in C++ on this project, but not necessarily. Today, I'd probably use C#. C++ is still a more efficient and productive choice, but the talent pool is deeper with C#, and there's nothing in a cursory glance that would invalidate C#, so that would be my choice.
Sorry, but that's how it is.
Admin
Engineers are a dangerous breed. Keep them the hell away from computers. I say this as a former engineer.
I remember once back in school when a professor in an engineering course decided to give his students some code as an example. It was one long function written in MatLab that consisted of exactly 3 variables: n, m, nn. He used this code to perform several complicated stress calculations and constantly redefined each variable every 10 lines or so. No comments, no line spacing. It wasn't even working on the same calculation the whole time. It was actually doing 5 separate things in order but just looking at the code you would never have thought that. And this was given to students to show them 1. how to do these calculations and 2. to write their code for a project.
Admin
Yes. How else could you have generated that list of language selection criteria, if the language doesn't matter?
Sure, there are multiple languages that could work, just like there are multiple libraries that could work to. Selection is certainly a design choice. However, that doesn't mean that all languages are appropriate, and honestly VB just isn't appropriate for all that much.
Admin
You may be able to "meet the requirements" as long as they are loose enough, but it is likely the users will be happier with a faster and more responsive system than would be possible in VB. (If you're not a regular reader/commenter, please bear in mind that I am usually on the defending team for VB.)
Admin
Seriously? I mean it's possible to write Mathematica in assembly, sure, as long as you want to pay top programmers lots of money for a very long time to do it. But that would be silly, because you could instead code the whole thing in transistors that cover the entire surface of the moon just to prove that it can be done. And if you realize halfway through that the people you've hired are not actually capable of remembering the layout of all 8e20 connections on the circuit board, and have consumed the entire remaining fossil fuel supply of both planetary bodies travelling from node to node, then you can just head go a bit further out into space and hire some aliens who can get the job done.
Admin
Admin
Admin
The real benefit is in speed: you can harness the power of the graphics processor to manage all those memory accesses.
Admin
I think that means that you should never ride your motorcycle in the rain. Also be awarded the overcompensation award in the Crotchrocket category.
Admin
Admin
Speaking from long bitter experience, a lot of technical types believe that any monkey can write software.
The result is software that looks like it was written by monkeys.
Admin
and the background colours?!
Admin
erm... so actually you don't endorse it?
Admin
But I have faith -- MS will get around to properly supporting multiple users any decade now...
Admin
FTFY
Admin
I thought the original reason to port to Windows was so that all the engineers could run their own copy of the software...
Admin
Ah, I see the problem. It should have accepted "Y", "N", or "FILE NOT FOUND".
Admin
Admin
Right, because it's impossible to find a Fortran compiler for windows.
Admin
Most of the "developers" strutted around proud of their manufacturing industry certification. Problem is, we weren't manufacturing software, we were coding software for manufacturing clients. And nobody knew diddly about proper coding disciplines.
Vice President of somethingorother at a publicly-traded retailer knew retail, but routinely hacked "fixes" into running production code while the complaining user stood by and watched -- never mind that if you screw up a decimal place in your warehouse program you'll get 40 semitruckloads of product instead of 4 -- and have to pay for them.
Admin
That's an ironic example, because the vast majority of Vista compatibility issues were due to the use of "pending deprecation" practices in XP products. That is, the one thing that rigorous certification should actually have prevented.
Admin
Admin
Admin
I'd be more worried about timing issues and dependencies in the code. Never mind the language; we're talking about modeling software, and that's usually resource hungry. And that in turn means it's probably dependent on quirks of the underlying system. The porting effort would be more than just recompiling; you'd have to hunt down those kludges and hacks and replace them with Windows equivalents (or, better yet, generic solutions).
Still should've taken less time and effort than what the "senior engineers" attempted, and been far more successful. WTF indeed.
Admin
You may be surprised.
The actual algorithms would likely be easy to move. I/O, especially terminal based, would have been a royal pain. Many unix systems had a curses library, but nothing was terribly standardized then. There is also the availability of certain libraries (eg, linpack and lapack).
Nowadays, porting is mostly a non-issue. The timeframe of the article was from when there were still big differences between SysV and BSD derivities, pre-ANSI C compilers were still around, and having the GNU toolshain wasn't a given.
Admin
The image is the Mac OSX Terminal icon.
Admin
I was more thinking of the algorithms. Also, I was doing ANSI-C in the late 90s, and so that just colors my view of the era. And it was on a SysV, now that I think about it. Although I did port some code to VMS, which, well, that was fun.
Admin
... but what happened to Eric?
Admin
I point you at the famous game Elite from the mid-80s. On the original BBC-B micro version - where it had about 14 KB of available normal RAM - some of the data was stored on the screen instead, as coloured pixels. However, this wasn't obvious because the code did a palette switch just before the relevant scan lines were displayed, turning all colours black, and reverted the palette immediately afterwards.
(It also did a screen graphics mode change at that point as well, going from a 2-colour high-def mode to a 4-colour low-def mode. It was possibly quite the most impressive hack I've ever seen, and it worked remarkably well.)
Admin
Admin
*Cries, I'm in the middle this right now.
Admin
It's right there in the article. VB has problems with basic rounding.
Admin
There's also a corollary to this theory. If you select a platform based on number of developers available on that platform, then you'll attract any goofball who calls himself a programmer and has seen that language. With C# this isn't as much of an issue... but if you select VB based on the fact that the developer pool is deep, you'll get 100x more resumes - and it will be that much more difficult to sort out the idiots and incompetents from the experts. This is doubly-so because the experts tend to self-select away from VB.
For an example of this, see "Django + Python + PostgreSQL" vs. "Any Framework + PHP + MySQL". Those who are smart enough to choose the more elegant solution generally produce better products (i.e. the distribution favors experts over idiots), whereas those who just goes with "the next big thing + PHP + MySQL" have an equal distribution between idiots and experts.
There's a reason many of us who work with legacy code in VB won't put it on our resumes - because without fail, EVERY VB project we've been put on is an unbridled mess. No reason to attract more mess - there is no such thing as elegant VB code.
Admin
Which got it so backwards that they put the 'e' at the end of the name, instead of the front.
Admin
Admin
Plus part of zero page, plus…
Ah yes, the 6845…Admin
1.) Change desktop background color. 2.) ????? 3.) Profit!
Admin
The real WTF here is VB, and I say that not only becuase it's a toy language, but because it's not a language appropriate for scientific calculation.
Admin
Some people get to work in a florist shop around sweet-smelling flowers all day. Other people have to work in a sewage treatment plant and deal with shit all day. It's the same basic idea - working with organic matter - but one is much better on the senses than the other.
Admin
You win. Awesome comment!
Admin
One thing that was left out in the story is that the database stored a single row. Due to the corruption, the database had a backup copy.
This gave the impressive tally of two databases/row.
Admin
I'm getting better! I think I'll go for a walk.
Admin
Also, VB doesn't have problems with basic rounding. Programmers who ignore the well-documented "round-even" rounding behavior of VB, and blindly expect "round-larger" or "truncate", have problems with basic rounding.
If you can believe Wikipedia, "round-even" is commonly used in bookkeeping, which is... (wait for it)... one of the environments they had in mind when creating VB.
Admin
HP-UX is a Unix dialect. It's easy to upgrade the hardware using a newer Unix OS.
This is an engineering program, probably written in C or Fortran. Most ANSI Standard languages like C & Fortran can be ported to other Unix OSes, quickly, including Linux.
It would have been far easier to upgrade the hardware & Unix OS than to re-write the code for Windows. Then, it could support any increased use over terminals.
So, yes, I endorse this solution.
Admin
It rounds to the nearest even whole number. In C#, the equivalent code is:
It also rounds to the nearest even number. If you want to round to up, use:
Of course, in C#:
I fail to see any eveidence that VB is a toy language because it doesn't round properly and C# is a professional language because it rounds properly.
Admin
DIM X as variant DIM Y as variant X = true; Y = true; if( val(X) = val(Y) ) THEN MSGBOX("Visual Basic is AWSOME") END
Admin
WTF?
DIM X as variant DIM Y as variant X = true; Y = false; if( val(X) = val(Y) ) THEN MSGBOX("Visual Basic is AWSOME") END
(should quit while I'm ahead)
Admin
To add to my previous comment, Math.Round behaves properly for financial environments, but doesn't behave properly for display purposes. Fortunately, you aren't supposed to use Math.Round for display, you are supposed to use:
This rounds to 13 as you would expect. This behavior is also consistent between C# and VB.Net.