24 karma · joined Apr 1, 2010 (16y ago) · 32 submissions
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
It's taught me to create pretty code that is indented correctly. I pretty much live in a debugger. Most people out of a CS program think they know how to debug stuff. They don't have a clue. It's taught me to be very meticulous and review every single thing I do down to periods(which BTW terminate loops and if statements making life hell) If you can't understand what you just wrote it needs rewritten.
As far as language comparisons. All variables are declared at the top of the program. All variables are fully global. If you move a variable to a smaller variable it doesn't throw an error it just gets truncated. Loops start at 1 instead of 0. There is very limited error handling.
I don't know of any resources online. I searched when I started working but I didn't find anything real helpful. I did have a 25 year old 30 million line code base to learn from though
comment 15y ago · link · parent
comment 15y ago · link · parent
MOVE SPACES TO LISTBAT-NAME.
STRING WORK-FILES "LIST.BAT" DELIMITED BY " "
INTO LISTBAT-NAME.
OPEN OUTPUT LISTBAT.
MOVE SPACES TO SCR-S.
STRING "DIR /B " DATA-PREFIX " > "
WORK-FILES "TMPLIST" DELIMITED BY " "
INTO SCR-S.
MOVE SCR-S TO LISTBAT-REC.
WRITE LISTBAT-REC.
CLOSE LISTBAT.
CALL "C$system" USING LISTBAT-NAME, 96
GIVING STATUS-VAL.
MOVE SPACES TO TMPLIST-NAME.
STRING WORK-FILES "TMPLIST" DELIMITED BY " "
INTO TMPLIST-NAME.
OPEN INPUT TMPLIST.
MOVE LOW-VALUE TO LIST-NAME.
PERFORM UNTIL 1 = 2
READ TMPLIST
INTO SCR-S
AT END EXIT PERFORM
END-READ
ADD 1 TO PROGRESS-REC-CT
INSPECT SCR-S CONVERTING LOWER-CASE-ALPHA TO
UPPER-CASE-ALPHA
PERFORM VARYING SCR-X FROM 50 BY -1 UNTIL
SCR-X = 1
IF SCR-S(SCR-X:1) = "."
MOVE SPACES TO SCR-S(SCR-X:)
EXIT PERFORM
END-IF
END-PERFORM
CALL "CC/STRINGER" USING SCR-S, STRING-INFO
MOVE SCR-S(1:STRING-INFO-LENGTH) TO TMP-RID
PERFORM LOAD-RPT-FILE THRU END-LOAD-RPT-FILE
END-PERFORM.
CLOSE TMPLIST.
The newline on some of those lines is off because HN makes it wrap but you get the ideacomment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
$data = "http://hackerunderground.com/solution/blank;
$ch = curl_init($data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$base = curl_exec($ch);
for($i=0;$i<10000;$i++)
{
$data = "http://hackerunderground.com/solution/$i;
$ch = curl_init($data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if($response != $base)
{
echo $i;
}
}
I like my solution best. Everyone should try it!comment 15y ago · link · parent