News for hackers. Stuff that matters.

redredraider

Re:Ask HN: If JavaScript could talk to databases on Thursday September 13, 2012 @03:50PM (#4518193)
So you want to give clients direct access to your database?
Re:Raphters, a web framework for C on Monday April 04, 2011 @02:51PM (#2407941)
Reinventing the wheel for lulz...
Re:Ask HN: How in the world do you pay for college? on Monday April 04, 2011 @02:17PM (#2407778)
College doesn't cost that much. I go to Texas Tech. 4-5K a semester for 8 semesters is 50k. A starting dev makes 50-60k.It's pretty easy to pay it off.
This is awesome. Someone port it to my circa 1994 cobol compiler and I'll be set.
Re:Are programmers likely to be musicians? on Wednesday March 30, 2011 @04:17PM (#2389013)
I program and I'm also studying music. Several of the programmers at my workplace play music. I would say %50 of my team. I think music theory and programming are very similar. The other musicians I know don't see the relationships I see.
Re:Ask HN: Why does PHP "suck"? on Wednesday March 30, 2011 @04:04PM (#2388944)
PHP doesn't suck. It runs the internet. It's possible to write crappy code in any language.
Re:High Burn Rates Result in Short Startup Runways on Wednesday March 30, 2011 @12:55PM (#2388072)
Isn't this obvious?
50-60%. I'm an intern though.
Re:Six ways to protect yourself from SQL Injection on Tuesday March 29, 2011 @07:49PM (#2385060)
I never thought of this. It's good
Re:Six ways to protect yourself from SQL Injection on Tuesday March 29, 2011 @06:10PM (#2384723)
If you sanitize every input then I think you will be ok. You just have to get in the habit of always running your safe() function on every variable that comes in a POST or GET. I would also make sure that SQL errors don't return anything. The page should just die. Automated scripts testing inputs look for error messages.
Re:Ask HN: Why are Java developers so boring? on Monday March 28, 2011 @01:56PM (#2379304)
When you say Java I immediately think of all the crappy programmers in my CS program who would choose Java as their favorite language even when it would be the worst possible choice. Hackers don't program in Java unless Java is the only solution. If you want better programmers offer more money. If you're tired of interviewing make them take an online coding test before they get a face to face interview. I wouldn't event interview someone if they can't pass the code test.
If it has to be updated on every page load I don't think there's anything you can do...I may be wrong I'm sure someone on HN will have some performance tricks. You can generate your headers and footers and store them in a file instead of touching a database every time. If you're killing your database server you're probably returning too many records or your queries suck. I wouldn't know without seeing them.
Re:Ask HN: I made $1M - what now? on Thursday March 24, 2011 @02:16PM (#2365221)
Learn to play an instrument. I've always found that to be a rewarding waste of time.
Re:Ask HN: I made $1M - what now? on Thursday March 24, 2011 @02:11PM (#2365198)
Take a vacation. Be frugal with your money and you should never have to work again if you can live on 30k a year.
Re:Ask HN: What should I do with $10k? on Monday March 21, 2011 @05:20PM (#2351625)
I wouldn't spend it or invest or anything. Leave in the bank or a CD and just feel secure enough to leave your job if you start hating it. The economy is bad.
Re:Help/Advice needed with starting a startup on Monday March 21, 2011 @05:19PM (#2351617)
I think it depends how much money you have to spend. If you have money then see about finding a developer. If you don't have money and you don't expect investment then I would say take your time. 6 months is not that long. Unless you're idea is fully developed it will probably take that long to figure out what it is you're really going to end up building based on feedback.
Re:Help/Advice needed with starting a startup on Monday March 21, 2011 @05:09PM (#2351579)
I would get cracking on web development if I were you. You can definitely do it alone for a while. That way you're not at the mercy of a programmer and you will have learned a useful skill in the likely event your idea doesn't make it.
Re:Ask HN: What should I do with $10k? on Monday March 21, 2011 @05:02PM (#2351543)
Buy a guitar. Learn to play it.
Right. So Groupon probably didn't go around hush hush. I agree with the post above about execution. It's not about being first it's about being the best.
If keeping it secret is that big of deal it's probably going to fail anyway. If something is so easy to copy that you can't tell anyone then it's not worth pursuing. IMO.
Re:The worst program I ever worked on on Wednesday March 16, 2011 @06:59PM (#2334339)
I'm interning with a company that is a COBOL shop. It took me months to make the transition from "normal languages". I don't think it's worth learning honestly unless you get a job in it. Here are some things it has taught me.

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

Re:The worst program I ever worked on on Wednesday March 16, 2011 @02:14PM (#2333168)
I'm sure it would make you a better programmer. Using tools that were abandoned by their company 10 years ago teaches one to be humble and to appreciate the little things in life.
Re:How to construct a web developer in twelve months on Wednesday March 16, 2011 @12:36PM (#2332706)
You can't be a web developer unless you can code. I think a good exercise would be copying a website. When I say copy I mean the whole thing front end and back end. Start with something easy like twitter. The whole front end is pretty much done for you. This is not super simple but I don't think you can become a developer in 12 months with no code experience anyway.
Re:The worst program I ever worked on on Wednesday March 16, 2011 @10:19AM (#2332087)
You really don't know bad programming until you have spent some time in a 50000 line cobol program. I'd post some crap I work on every day but I don't want to make anyone cry. Nevermind. Here's some random code I'm working on.

             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 idea
Re:Ask HN: How much is sweat equity worth? on Thursday March 10, 2011 @04:13PM (#2310808)
If you really need technical people you're going to have to pay them unless you've got something amazing built so far. Or you're going to have to bring in cofounders and give them a more even split. That will be hard if you've got all of the time in it. In my situation I have put a lot of time and effort into my project and I will need to bring someone on board soon but it irks me to think I will have to give up more that 20% to someone who hasn't put the time and risk in.
Re:Ask HN: How much is sweat equity worth? on Thursday March 10, 2011 @03:27PM (#2310629)
Another thing. If you're the technical guy then you should only hire sales people. Make money then hire programmers. I doubt the project has grown so large you can't maintain it. If you haven't made any money then your 4000 hour/25000 dollar project is just code. No one cares until it makes money.
Re:Ask HN: How much is sweat equity worth? on Thursday March 10, 2011 @03:17PM (#2310581)
As a programmer I don't get involved unless there's money to pay me. I like the idea of getting paid up front for my work and keeping the 5% share and the "owner" of the project recouping my up front pay when the money starts rolling in. There's not a project you could show me that would convince me to work for equity only. Just my opinion
Haha my bad.

   $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!
Re: on Friday February 18, 2011 @05:11PM (#2237503)
If it's computer related you can teach yourself. You want to learn more languages etc. I think you would be better off learning programming concepts the right way from a CS textbook or some other computer science resource so that you are capable of learning every language. There really isn't that much to learn. Thousands of dollars worth of more school is not the answer in my opinion.

Older »