- 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
Top Cod3r saying that people have learned from him is as funny as the rest of his posts :D
Admin
My quick estimate for a starting point for square roots is to take the first half, rounded up, of the whole number digits... in binary.
so 1,000,000(decimal) is 11110100001001000000
the half of the bits is 1111010000, which is 976(decimal)
65,536 -> 10000000000000000 -> 100000000 -> 256
65,535 -> 1111111111111111 -> 11111111 -> 255
conceptually, it's just moving the 'decimal' point, unfortunetly, I havn't seen a calculator that handles non-base 10 non-integers. (that is, binary 10.01 = decimal 2.25) But then, I havn't been looking particularly hard.
It also works in decimal, but you can end up much further off.
Admin
The user can just use the old GWBasic program to get a list of possible beams, then put the resulting beam from the basic program into the fancy new GUI program - it should pass, right? Just use it as a verification tool.
Admin
Admin
Admin
Ding! Ding! Ding!... looks like we have a winner... that's what you get when you have programmers and user and nothing in between. Often times you really need an analyst in between.
Its about solving the problem the user's way, programmers often solve the problem their way. An analyst would make sure the programmers also package up their solution so it looks like it solves the problem the user's way.
Sometimes, when you're lucky, you can get a programmer that can wear the analyst hat as well.
Admin
"This approach is known as iterative approximation, and is not used all that often in software development."
What the heck? Darn near every AI technique is some form of gradient descent, i.e. iterative approximation. The same is true for most of scientific computing and numerical analysis. Even binary search is a form of iterative refinement. Don't they teach mathematics in CS programs anymore?
Admin
Well-well look. I already told you: I deal with the gd dmn customers so the engineers don't have to. I have people skills; I am good at dealing with people. Can't you understand that? What the hell is wrong with you people?
Admin
You can learn from Top Cod3r! Simply read his posts and you'll learn what not to do.
Admin
Why is everyone forgetting that there are two roots? √(-25) = ±5i
Admin
Here in Texas it works similarly. I cannot legally use the word "engineer" in my job title or on my business card because I'm not an RPE (Registered Professional Engineer). To become one I'd need PE certification and I'd need to register with the state.
Texas' law arose from a famous case where a school building exploded back in the 1930s due to an improperly designed boiler system put together by someone who was incompetent, but was using the title engineer.
Now, my job is as an engineer. But, anything that needs signoffs and certs for safety, etc. need to go in front of RPEs for signoff, and that's a Good Thing.
Admin
If you use Linux, check out 'bc'.
I've actually had to code up a proper square root library function before.
There's a lot of nifty tricks you can play based on the idea that (x + 1)^2 = x^2 + 2x + 1. So, if you're iteratively refining a square root, if you keep track of what 2x + 1 is, you can decide if setting a bit will put you over the target value or not. In the end I was surprised at how fast and small you could make it. It's actually faster than division on the machine I wrote it on.
Admin
The quadratic equation x²+25=0 has 2 roots. But the ordinary root function is undefined for negative values. This is because it would no longer be a single valued function, which is desirable.
Admin
In high school, I did this in a business math class to compute depreciation tables and compound interest problems. Those were tedious and very easy to get wrong, but the math was simple at its base. I did something similar in college for my Engineering Economics course. I didn't feel bad doing this, since other kids had calculators with this built in, and the teacher cared more that we used the write formula / depreciation schedule than that we actually computed the arithmetic correctly.
In my DSP course, though, I wrote programs to plot response curves in response to various filter coefficient combinations. I went ahead and showed my program to the professor and told him I had written it and asked if I would need to bring a different calculator to my exams. His response was that if I was smart enough to write the program, then it's clear I understood the material and could use it. Just don't give it to anyone else. :-)
Admin
It'd help if I used the right homophone.
Admin
"The square root of 5 is something like Infinity"
Ah, yes... at least it is close.
Admin
Quake III uses such an implementation,
You can use such an iterative method for calculating inverse sqrt, but it turns out that 0x5f3759df is a 'near perfect' first guess.
More info here: http://www.codemaestro.com/reviews/9
Admin
Admin
Admin
Because engineers aren’t programmers, don’t want to be programmers, and don’t particularly like programming. When your competition uses software built by programmers and has their staff focus on engineering, they’ll leave you in the dust.
Admin
True, but it's still trolling. I guess it was Alex's turn to take out the trash ^_^ Let's leave it out ;)
Admin
And where leaves that the freedom of speach?
Admin
Meh, the Babylonians were more VBScript kind of guys ....
Admin
Errrm isn't that the point of the article???
Why force your engineers to write script wrappers for mis-sold 3rd party software just so you can make said software work exactly like the in house software you already have?
Admin
x² - 25 = 0 x² = 25 x = 5
Admin
I guess the fancy GUI application didn't lend itself to easy scripting. Like so many of them ...
Admin
Or x = -5, to be exact...
Admin
/me slaps calc.exe around the head with a large trout
Admin
Admin
Admin
Probably because the vendor missed one of the biggest requirements of the application and passed it off as unnecessary. The WTF made it obvious that the product had no value add.
TRWTF is that you suggested to purchase a faulty product and add scripts to correct its shortcomings when it would be a lot easier (and less expensive) to use the tools you already had.
Admin
Sorry didn't quote the last thing properly,
Probably because the vendor missed one of the biggest requirements of the application and passed it off as unnecessary. The WTF made it obvious that the product had no value add.
TRWTF is that you suggested to purchase a faulty product and add scripts to correct its shortcomings when it would be a lot easier (and less expensive) to use the tools you already had.
Admin
Admin
Admin
Thank god this doesn't happen to to software engineers :D
Admin
It's only the first half if you're big endian.
Admin
I'd be very careful with that statement. Look at the automotive industry. Every single year cars are becoming more and more computer and therefore software controlled.
Even braking, steering and throttle are beginning to be computer controlled. Throttle by wire is already standard in quite a few cars, my Audi I had for a while had it. Brakes / Steering I know such technology already exists but I'm not sure if it's made it to any production vehicles yet.
However, if you have ABS or traction control, even if your brakes are hydraulic, they are still influenced by a software at this point in time. The pressure that actually reaches the brakes is all software controlled.
So there are already plenty of things that Software Engineers can be just as much held accountable for and it's increasing. Imagine a bug in an ABS system that under some weird obscure conditions causes all wheels to lock up while you're travelling down the highway at 70mph with a semi-truck right behind you.
While there are some safeguards in these systems to prevent problems, such as requiring multiple CPUs from different manufacturers running in parallel, these only protect against defects in the CPUs themselves (if one CPU goes crazy due to some defect it won't match the output of the other CPU). They don't protect against an inherent flaw in the software design that both CPUs are happy to execute.
Admin
Admin
I remember doing this in school, and created a function called 'slut()' or 'square look-up table'. The teacher was not amused :)
Admin
Same place as always.
Freedom of speech doesn't mean you can say whatever you want anywhere you want. That's why you can be arrested for creating a panic by yelling "Fire!" in a crowded movie theater when there isn't one.
Admin
Admin
No, this comment isn't worth reading.
Admin
Avionics software development requires an insane amount of documentation and V&V yet still doesn't make me feel safe to fly any more...
Admin
pseudocode for most applications:
Admin
The near perfect first guess is 0x5f3759df - ( i >> 1 )
Admin
Admin
Ooh... looks like a mod thought that TopCod3r's anti-solutions went a bit too far, this time.
Admin
I used to program Physics equations into my graphing calculator back in High School. I could enter given values and receive answers for the variables. Someone told the teacher but he didn't care. He figured my ability to translate the equations into code was sufficient proof of my understanding--as long as I didn't share :) .
Admin
That's not funny. Unless the phrase "going to jail" has humorous connotations in Brazilian that it doesn't have in English. Anyone know?
Admin
TopCod3r's should be deleted more often.