![]() |
Re: Programming jokes
Quote:
(Java-C-MPLab pseudo-goullash code) Code:
int rand = Math.rand() * 127; |
Re: Programming jokes
Quote:
The best way I've found to generate "random" numbers on Vex/FRC controllers is to start a timer at the beginning of your program, and whenever you need a random number get the modulus of the timer value when divided by a number of your choice. |
Re: Programming jokes
Quote:
|
Re: Programming jokes
Our teams first year we were trying to get the camera to work. It did everything except what we told it to do. We were just about to stop for the night when one of our mentors walks by and the camera starts moving. We have him walk by again, and it moves again. We coulnd never get the camera to track the green light that year, but we managed to successfully track our mentors bald spot:)
|
Re: Programming jokes
Interactive real time 100fps 3D reality is discovered by a programmer who went for a walk.
|
Re: Programming jokes
It probably requires DirectX 10 though. No way I could run that "Reality" engine :D
|
Re: Programming jokes
Quote:
![]() :p Jacob |
Re: Programming jokes
Quote:
a really simple way of doing it is to use a LCG (Linear Congruential Generator ... this is what the lcg_value function in php does) X.0 is your seed X.n+1 = (a*X.n + c) mod m wikipedia suggests: a = 1664525, c = 1013904223, m = 232 this is *still* not a great way to generate random numbers if you are doing simulations, but as far as FIRST applications go it should be pretty sufficient. |
Re: Programming jokes
Quote:
|
Re: Programming jokes
After saying "this is it, I have the right answer!" countless times only to discover that it was not the right answer, I developed my universal programming qualifier:
"In my perhaps slightly correct opinion, I think I may have possibly estimated what I believe could maybe be almost somewhat close to a semi-decent approximation of the nearly-correct answer." |
Re: Programming jokes
I was in the back of our room doing the programming (I use the computer in the back, MPLAB is on it, and then the computer in the front downloads it), so I told my coach is was ok to go ahead and download the autonomous, which he did. He consequently tested it and Fluffy raised her arm and lunged forward, nearly killing our coach's projector.
After that, he learned where the "robot reset" button was. |
Re: Programming jokes
here are a few i thought of:
1. Right code, wrong robot 2. Oh, it wasn't supposed to do that? 3. I think something is wrong, I keep getting "build succeeded" 4. Digital inputs on the robot controller are not the same as the oi 5. I thought you were programming 6. Sure I can write my own game, but I think asking me to make the robot go forward 10 feet without setting itself on fire is a little too much to ask. |
Re: Programming jokes
Quote:
|
Re: Programming jokes
A joke based on arrays. Now I've seen everything.
|
| All times are GMT -5. The time now is 08:20. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi