Python
Eh, programming is programming. All the fun mathy parts happen prior to that. One of my chief complaints about where I work now is the willful and active ignorance displayed when numbers and formula are in play.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
I've seen code devoid of design, forethought, or analysis. Shit, I've written it. I've also gone the other route and it's forced me to see programming as another form of mathematics. I just translate it to machine instructions. Most commercial coders I've known don't simply suck at math, they recoil in horror from anything worse than high scoop algebra.
Edited By Malcolm on 1451004895
Edited By Malcolm on 1451004895
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
I was once asked by a child if math was important to be a computer programmer. I said "Sometimes, but the main importance of math is to teach you how to think logically."
Honestly, as a typical business programmer I rarely had to do anything beyond / * + and -.
Honestly, as a typical business programmer I rarely had to do anything beyond / * + and -.
"Be bold, and mighty forces will come to your aid."
print("This is a mortgage calculator that will find your monthly payment" + "
")
principle = input("What is the loan amount?" + "
")
principle = int(principle)
interest = input("What is the interest rate?" + "
")
interest = float(interest)
monthlyinterest = (interest * .01)/12
yearsofpayments = input("How many years would you like to make payments?" + "
")
yearsofpayments = int(yearsofpayments)
totalpayments = yearsofpayments * 12
term = (1 + monthlyinterest) ** totalpayments
paymentamt = principle * (monthlyinterest * term) / (term-1)
paymentamt = float(paymentamt)
print("monthly interest of {0:.3f}".format(monthlyinterest))
print("principle of {0:D}".format(principle))
print("term of {0:.3f}".format(term))
print("
" + "Your house would have a monthly payment of {0:,.2f}".format(paymentamt))
the video i was watching wrote the formula for this challenge totally wrong, it seemed like a weird test
e: the board auto captalizes "d" because it's a dickhead
Edited By Troy on 1451020129
")
principle = input("What is the loan amount?" + "
")
principle = int(principle)
interest = input("What is the interest rate?" + "
")
interest = float(interest)
monthlyinterest = (interest * .01)/12
yearsofpayments = input("How many years would you like to make payments?" + "
")
yearsofpayments = int(yearsofpayments)
totalpayments = yearsofpayments * 12
term = (1 + monthlyinterest) ** totalpayments
paymentamt = principle * (monthlyinterest * term) / (term-1)
paymentamt = float(paymentamt)
print("monthly interest of {0:.3f}".format(monthlyinterest))
print("principle of {0:D}".format(principle))
print("term of {0:.3f}".format(term))
print("
" + "Your house would have a monthly payment of {0:,.2f}".format(paymentamt))
the video i was watching wrote the formula for this challenge totally wrong, it seemed like a weird test
e: the board auto captalizes "d" because it's a dickhead
Edited By Troy on 1451020129
Honestly, as a typical business programmer I rarely had to do anything beyond / * + and -.
I've occasionally had to break out exponents, the exponential function, logarithms, and the odd bit-wise operation. Outside of simple tree methods, I've never needed what I consider to be "real" algorithms, that is getting a solution through something besides brute force alone. However, it's nice knowing that kind of shit just in case it comes up. I did most of my grad work on this, this, and this. I have yet to encounter a commercial/biz problem in my working life that needs weaponry of that calibre or the umpteen zillion different kinds of time and space analyses I got indoctrinated with.
We once had the internal R&D department at work come up with a predictive thingy for us. It involved a little more than that but not much. Sophomore shit and nothing but a linear model. That said, no one could figure out how to plug the input args into it or what they were without calling them up. Then I got a look at it and explained it to my manager. He thought I was wrong and made me call up the R+D dude on the phone because I wouldn't back off. The guy on the other end of the line (who now works for Google), in his Americanized German accent, confirmed everything I said.
All the interviews I've run, all the candidates I've suffered through ... most of them can't write a Fibonacci function, let along write it the efficient way. I used to be incredulous when my LISP professor told us that most real world programmers fuck up writing a binary search method. Turns out he was right.
Perhaps the most important thing I've learned over the years -- there are lots of people who can churn out code; there aren't many who know what to do before you start coding or what quality code looks like. They just hack and god help you if you have to maintain their shit.
Edited By Malcolm on 1451021507
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
I have actually looked at a Cali job in the past year, but it was near LA.Troy wrote:Malcom bring you curmudgeon ass to SF and teach me to code, thanks
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
They just hack and god help you if you have to maintain their shit.
Well, you'd never want to work with me, then. :p I can sometimes make magic, but the code I come up with to do it will be hacked all to hell and gone.
Most my "programming" these days is specifically for the purpose of manipulating numbers and doing math upon them. But that's what the computer is for, I don't have to do the math myself. You only need enough math to know how to code the formulas, not actually carry out the calculations.
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
If something's one shot, then I don't care. If it's meant to be reused, it needs to be designed and thought out properly. The product I work on now has four different frameworks to query one fucking DB. FOUR. Three are hack jobs. One is so high-level, it's worthless.
One's nothing but a monolithic hack job and no one's really sure how it all works.
Another is abstract to a fault.
A third was obviously a rushed process they brute forced.
The fourth is literal to a fault.
One's nothing but a monolithic hack job and no one's really sure how it all works.
Another is abstract to a fault.
A third was obviously a rushed process they brute forced.
The fourth is literal to a fault.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
The plan is to integrate them all into one next year sometime. Once you excise the stupidity inherent in the literal one, it's quite fluid. I got repeatedly yelled at for pointing out said stupidity at its inception.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
I wrote a very simple - yet awesome to me - hangman program on Saturday.
Reading a file, randomly picking a string out of an object, providing a graphical output to a user than changed based on their inputs, success and fail branches, all that sexy stuff. Hardest thing I had to do was figure out how to change each instance of a letter in the _ _ _ _ output instead of just one.
Then Sunday I spent the day figuring out why the Tower of Hanoi problem is solved using recursive functions. And then the Panthers lost. So Saturday was a lot better than Sunday.
Reading a file, randomly picking a string out of an object, providing a graphical output to a user than changed based on their inputs, success and fail branches, all that sexy stuff. Hardest thing I had to do was figure out how to change each instance of a letter in the _ _ _ _ output instead of just one.
Then Sunday I spent the day figuring out why the Tower of Hanoi problem is solved using recursive functions. And then the Panthers lost. So Saturday was a lot better than Sunday.
Then Sunday I spent the day figuring out why the Tower of Hanoi problem is solved using recursive functions.
If you can master recursion, you beat out 50% of the intro programmers out there. It's inefficient but elegant. If you want to fuck with your brain, try writing the Hanoi solution without recursion. Try a Fibonacci generator or factorial calculator next. I'd recommend hitting trees (specifically binary search trees) after that.
providing a graphical output to a user
Ah, ASCII. Think my first programmed game was Tic-Tac-Toe.
Edited By Malcolm on 1454974883
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Had done these already in a non openware book. They were much easier to grapple. Will check binary trees out next as that's the second time it was mentioned to me.Malcolm wrote:Try a Fibonacci generator or factorial calculator next. I'd recommend hitting trees (specifically binary search trees) after that
Actually there's a file called rabbitsfucking.py on one of my machines somewhere.
Django looks like a Python web framework, so I bet it has objects to implement the MVC pattern. That said, it doesn't hurt to know what it is on a conceptual level, because you could hear it applied to anything from webpage design to an individual widget in a UI. You'll also hear it riffs on it like MVP or MVVP or other bullshit acronyms that differ just enough for some desperate loser HCI graduate to write a thesis or dissertation on them.
After you can handle trees, I might focus a bit on DB interaction.
After you can handle trees, I might focus a bit on DB interaction.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."