- 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
This looks more like song chords than actual code. The "A#" keeps jumping out at me...
Admin
Admin
It took a 256x256 matrix and a little bit of fiddling with sound functions to get "Bohemian Rhapsody" out of this code.
Admin
Admin
I was told there would be no math.
Admin
Admin
So I guess this dates back to the time when every computer product, hardware or software, was required to have a slash in its name. Before CamelCase there were Slash/Words.
Even the first OS I learned required every command line to begin with a slash. You know, as in, Hey Computer! Wake up! Incoming!!
Admin
Admin
Admin
I learned in my numerical analysis class, if you think you want the determinant of a matrix, you're probably mistaken.
Admin
Admin
Admin
Admin
Admin
https://en.wikipedia.org/wiki/Simulation_argument
It would certainly explain why everything seems to be digitized (quantum) if we zoom in far enough, and why quantum stuff doesn't like being analyzed too closely (uncertainty principle) and how the multiple universe hypothesis could be implemented by nothing more than a fork() call.
Personally I think the programmers of our "reality" are frantically trying to stay ahead of our experiments such as the LHC. Also they keep coming up with more and more bizarre stuff to throw at us and we keep buying it.
If I'm correct, they'll probably arrange to delete this post. Or me.
Admin
Graphical statements have become methods, which means that in true object oriented fashion* this:
Calls the Print method on Me. If there is no Me (in a standard module) it won't compile. If there is but it doesn't support graphics methods, you'll get a run-time error.Admin
No a 2d array of Strings is not a matrix, it would have to be a 2d array of numbers. Even then I would say that not all 2d arrays of numbers are matrices, it would have to serve a purpose that relates to the mathematical meaning of "matrix".
Admin
By small n you must mean 0 < n < 5
Admin
Admin
Hahahahaha
Admin
Admin
Admin
This is one of those programmers with 30 years of experience that aren't curious to go right-click+view-source in their browser.
Admin
I really don't like VB, but this I could handle. It's clearly a work of art. (and art doesn't need to be correct for all circumstances (and none)) Adding comments would ruin it's beauty!
Admin
Nah, dude - this is how most corporate budget-oriented dumbasses look at a situation like this:
I pay you x amount of dollars per year to work for me as a developer. (For the sake of simplicity, let's say you're the only IT-related cost to the company.) You're asking for y dollars to buy something that you could otherwise create? Are you nuts? You do it. What am I paying you for? I'll be paying you to be here anyway.
Admin
And I wish they don't hire math dropouts to develop avionics software.
Admin
If anyone here ever rode in a vehicle powered by something other than muscles or whose wheels have designs more complicated than simple spokes, you depended on matrix calculations even though you didn't do the calculations yourself.
If your computer sometimes plugs into AC power, you depend on the power company's matrix calculations even though you didn't do the calculations yourself.
If you have a hard drive that lets you read back what you wrote...
etc.
Yes matrix calculations are common, even though most of us never have to do them.
Admin
It's amazing how much you forget when you don't use it. I had determinants in school, but I'll be damned if wikipedia's page doesn't look like an alien language. This page has a great step by step on solving for n sized matrices. Easy to read and understand. http://people.richland.edu/james/lecture/m116/matrices/determinant.html
Admin
I am really curious what kind of application need to compute determinant of arbitrary size ... well, except Matlab style of app whose purpose is to enable other to do scientific computation.
Admin
Admin
Sorry, not true. I've worked with some statistical applications where you simply need to know the determinant; it's OK to use efficient matrix factoring methods first (since we need to do other things with the matrix anyway), but when we're finished being efficient we still need to know the actual determinant.
(Admittedly, one of these applications had a bug that I seriously considered submitting, except that there's no way to anonymise it and many reasons why the code is commercially secret.)
Admin
The problem with this approach is that you run into the "You seem to be telling me that you're a worthless programmer" issue that generally has "...security will escort you off the premises now" solution.
This is probably a good thing for you in the long term, but may be bad for your mortgage repayments or food purchasing in the short term.
Admin
TRWTF literally is Visual Basic
Admin
How original you are! Oh yes you are, you original little person you!
If you get here earlier you could try for a fr!st p0$t too!
Admin
Mathematically - [url="http://en.wikipedia.org/wiki/Matrix(mathematics)"]matrix[url] element can be anything comes from a [url="http://en.wikipedia.org/wiki/Field(mathematics)"]field[url] or even a [url="http://en.wikipedia.org/wiki/Ring_(mathematics)"]ring[url].
Admin
Computing log-likelihood for general multivariate Gaussian, yes, that would be a reason for computing determinant of matrix of arbitrary size.
Admin
That's only true for sufficiently large values of 2.0f.
(Redneck CAPTCHA: jugis - Dang! My jugis empty!)
Admin
We lied.
(CAPTCHA - ingenium : Gentlemen, start your ingenium!)
Admin
Opportunity cost. As in "...if I'm solving ancillary problems I don't have the opportunity to solve real business problems, which thus wastes time and money".
HOWEVER - the key here is not mentioning "opportunity" or "cost". The key point is to mention that solving the non-business-related problem will be "fun", at least here in the good old U.S. of A. If the boss (any boss) hears you're having fun the automatic reaction will be "Oh, no you don't! This is a business, my friend!". (No, actually you're not, but I digress). "You're here to solve critical business issues!" (Translation: you're here to be my puppet. Dance, puppet, dance!) "Just to SPITE you I will purchase the software you'd rather write yourself! HAH! I AM SO MUCH SMARTER THAN YOU!! BU-WA-HA-HA!!!!!".
Sometimes it's just a matter of learning which button to pull. :-)
(CAPTCHA - iusto : I'll be ready in iusto minute.)
Admin
Line numbers are actually very useful things to have in a Visual Basic program - or at least VB6; you can use the Erl variable and an error handler to tell you precisely where an error occurred in a function or sub routine - but it only works (usefully) if you've numbered your lines.
I only found this out because I am forced to maintain VB6 code at work and anything that makes bug fixing easier is welcome; the fact that I found a plugin for VB6 which automagically numbered all the source files was a boon too.
Admin
There's a reason why I dropped out of college to code web business apps: math makes my eyes bleed.
Admin
Let's recall the definition of O(): a function f is big-oh of g (sometimes written as (O(f(n))=O(g(n))) if {exists c, M: forall m > M: f(m) <= c*g(m)}.
Let's go over your statement: {forall N, n < N: exists c, M: forall m > M: f(m) <= c*g(m)}. In other words, all functions are big-oh of all other functions. Which is wrong.
What you probably meant to say is that the values of f and g on any finite set of numbers doesn't influence whether f is big-oh of g. More precisely, if f* and g* differs from f and g at only finitely many values n, then f = O(g(n)) iff f* = O(g(n)) iff f = O(g*(n)) iff f* = O(g*(n)).
Proof: I'll do both directions of the first 'iff'; hopefully you can extrapolate the technique from there.
let's first say that f=O(g(n)), iow, exists c, M: forall m > M: f(m) <= cg(m). Let M2 be the largest number at which f and f differ (f(M2) != f*(M2) and forall M3 > M2: f(M3) = f*(M3)), or anything (e.g. M) if f = f*. Then, forall m > max(M, M2): f*(m) = f(m) <= c*g(m).
Next let's say that f!=O(g(n)), iow, forall c, M: exists m > M: f(m) > cg(m). Let M2 be as before; then forall c, M: exists m > max(M, M2): f(m) = f(m) > c*g(m).
Also, the constants do matter. That's why we don't flip a coin when choosing between quicksort and heapsort, or between splay trees, AVL trees and red-black trees. In practice, resource use for only moderately large values of n is also highly relevant. Avoid fibonacci heaps like the plague. While they theoretically speed up Dijkstra's shortest path algorithm, they're dog slow in practice.
When correcting people, please be correct :P