Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mr-user13505ypublic int GetResult()
{
if (i==1)
{
return 5*10*1;
}
else if(i==2)
{
return 5*10*2;
}
else if(i==3)
{
return 5*10*3;
}
else if(i==4)
{
return 5*10*4;
}
...
else if(i==20)
{
return 5*10*20;
}
}
Here is my embarrassing dark past. When I started programming I don't know how to use loop correctly. -
Trithon10295yhmm my first function....
i think (other than main) it was something like
@highlight
void Button1_Click( Object sender, EventArgs e ) {
if (Textbox1.value == 2) Textbox2.value = "10"
//and such for all the binary conversions from 0 to like 128 or something
}
it was autogenerated from the windows forms builder and i didn't know how to rename form elements back then haha -
First function ever written:
Public void sayHello() {
System.out.println("Hello");
} -
I still have pretty much every program I've every written.
The first programs are now on Gitlab in a "sourcecode 1992" repo as well as on my home server. They were transferred from cassette tape, to 5.25 floppy, to diskette, to hard disk, to cloud.
First one gives infinite poop (I was a kid, what do you expect)
10 ?"POOP"
20 GOTO 10
The second one came from a magazine, and prints a randomized maze.
5 REM Random Maze
10 ?"{CLR/HOME}"
20 ? CHR$(205.5 + RND(1));
30 GOTO 20 -
I didn't write a function
I modified a entire bot in JavaScript for Discord.
Boy that was quite a rollercoaster ride. -
iirc my first steps were playing with existing code in pawn. Not sure about any specific function.
Related Rants
My first function which I wrote 3 years ago..
Adding two numbers in JavaScript.
add = function ( a, b ) {
Return a + b;
}
What's yours ?
rant
learner
first program ever
javascript
programming