d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Make Me A Better Programmer - From Step 1
Prev1262728293056Next
Add Reply New Topic New Poll
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 13 2013 03:41pm
Web development seems like it is always undergoing big changes. The future will be exciting for sure.

Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 18 2013 07:35pm
Start my internship tomorrow! wooooooo.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Nov 18 2013 07:44pm
Quote (rockonkenshin @ Nov 13 2013 06:30am)
Fuck Ruby and fuck Rails. Scala and Play are where it's at. Also, 2007 called and they want their framework back. ;)


Grails!
Member
Posts: 11,637
Joined: Feb 2 2004
Gold: 434.84
Nov 18 2013 08:12pm
Quote (carteblanche @ Nov 18 2013 08:44pm)
Grails!


I've been working on a project for customer extending an in-house system build with an ancient version of Grails that I can't upgrade and it's awful. Tons of weird quirks and bugs that are mostly fixed in newer versions.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 18 2013 10:06pm
I used to post code that I had finished in this thread. Sadly most of the stuff I have done this semester is theoretical.

I'll just post this bit of x86 from a previous assignment. Had to write a function to calculate the bessel function of the first order iirc.

Code
bessel: frame z
uses ecx, ebx
mov ebx, [z]
mov ecx, 1
fst Q[x_val]; stores x for later use
.begin
push ebx
call exp;ToS = x^n
fst Q[t_i]; t_i = x^n
fld1
fld1
fadd ; ToS = 2, x^n
push ebx
call exp ; ToS = 2^n, x^n
push ebx
call fact ; eax = n!
mov [tmp_sto], eax
fild Q[tmp_sto]; ToS = n!, 2^n, x^n
fmul ; ToS = n! * 2^n, x^n
fdiv ; ToS = t0 case (x^n / (n! * 2^n))
fst Q[result]
fstp Q[t_i]; ToS = empty, result = t_i = t0
.loop
finit
fld Q[x_val]
fld Q[x_val]
fmul ; ToS = x^2
mov eax, 4
mov [tmp_sto], eax
fild Q[tmp_sto]; ToS = 4, x^2
mov [tmp_sto], ecx
fild Q[tmp_sto]; ToS = i, 4, x^2
fmul ; ToS = 4*i, x^2
mov [tmp_sto], ebx
fild Q[tmp_sto]; ToS = n, 4*i, x^2
mov [tmp_sto], ecx
fild Q[tmp_sto]; ToS = i, n, 4*i, x^2
fadd ; ToS = (n+i), 4*i, x^2
fmul ; ToS = (4*i)*(n+i), x^2
fdiv ; ToS = x^2 / (4*i*(n+i))
fld Q[t_i] ; ToS = t_(i-1), x^2 / (4*i*(n+i)))
fmul ; ToS = t_i
fchs ; ToS = -(t_i)
fst Q[t_i]
fld Q[result]
fadd ; ToS = current result
fstp Q[result]; ToS = empty
inc ecx
.check
fld Q[t_i]
fabs ; ToS = ABS(t_i)
fld Q[brk_pt]
fcomi st0, st1
jb .loop
.done
fld Q[result]
ret
endf



I <3 assembly. Even when I get really weird fucking errors.

This post was edited by Eep on Nov 18 2013 10:08pm
Member
Posts: 57
Joined: Oct 21 2013
Gold: 0.00
Nov 19 2013 04:59pm
[QUOTE]cout << "Please enter a y or n and try again!" << endl;
return 1;/QUOTE]
[QUOTE]cout << "Error: You may only enter a number between 0 and 1000. Please try again." << endl;
return 1;/QUOTE]

That's your problem buddy. You only need to return a value at the end of a function. Since you are only dealing with 1 function, it will always be "return 0;"
You don't need to return a value at the end of the loop. ^.-
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 19 2013 05:45pm
Quote
cout << "Please enter a y or n and try again!" << endl;
            return 1;
cout << "Error: You may only enter a number between 0 and 1000. Please try again." << endl;
    return 1;

That's your problem buddy. You only need to return a value at the end of a function. Since you are only dealing with 1 function, it will always be "return 0;"
You don't need to return a value at the end of the loop. ^.-


brah that was a long time ago.

This post was edited by Eep on Nov 19 2013 05:46pm
Member
Posts: 2,217
Joined: Sep 10 2007
Gold: 35.88
Nov 20 2013 02:49pm
Quote (0n35 @ Nov 13 2013 01:06pm)
php and hphp are the new meta just wait


i got php for days!
/agree
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Nov 26 2013 01:19pm
got my laptop today, thing is a beast

16 gigs of ram and an i7 q740 iirc

not sure what the gpu is

typical setup stuff today - was only there 3 hours. Learning about their inner network (using lync) and getting accustomed to some other stuff like making time cards etc.


Got myself the "Pro ASP.NET 4.5 in C#" book to read over the break and start breaking into that shit as well.

Think I am going to grab VS 2012 off my dreamspark account since I don't have access to my MSDN thing at work yet.

Very interesting place. Devs are often out contracting to other businesses and only a handful are at the home base at any given time.
Member
Posts: 7,593
Joined: Jan 4 2011
Gold: 860.69
Nov 27 2013 08:15pm
Quote (Eep @ Jun 27 2012 03:51pm)
someone at cprogramming forums told me my indentation was ass

how can I improve it // what is the standard way to do it nicely


No, not code is 'Ass' code varies from person to person some may take a longer approach some shorter.
Some might be slightly more secure but CODE can be changed or 'fixed'
Chuck me a message homie.
Go Back To Programming & Development Topic List
Prev1262728293056Next
Add Reply New Topic New Poll