HNHacker News
TopNewBestAskShowJobs

hardy263

196 karma · joined August 24, 2009

submissionscomments
hardy263··on Chinese Infinite Magical Hard-Drive
Not as extreme, but when I bought my 1.5 terabyte hard drive, I thought that I would be seeing 1.5TB when viewing its properties. I saw 1.36TB instead. So where did the other 0.14TB go? I thought I got scammed.

Then I looked at the number of bytes on the hard drive, and it listed as exactly 1,500,299,264,000 bytes, and I realized that computers and manufacturers use different metrics.

hardy263··on Musicians Turn your iPhone into a real instrument, not just a game
This wouldn't be an alternative to a real instrument, because beginners wouldn't be able to practice correct posture, and professionals don't get the flexibility they need.

However, this would be really useful for people who play music as a hobby. I play the violin, and I've wanted to try using an electric violin, but costs were a little prohibitive. A $10 app to simulate the experience would be a pretty good deal to me.

hardy263··on Show HN: My weekend project, tracking the services you can't have in Canada
No, it's probably not because our country starts with "can"

The real itch is that some of these services are available as long as I drive an hour south and get past the border and find open wi-fi.

Pretend you're an avid soccer fan. It's as if the world cup was on TV, and your friends are all crowding around it. All you get is the commentary and cheering when the ball is scored, but you can't actually see the game, since they're blocking the TV. And then when your friends ask you "Wasn't that a great game?", and all you can say is "Uhh...I think so?"

It's so close, yet so far.

hardy263··on What programming languages do people hate most?
I've never hated a programming language until I met LabVIEW. In all honesty, the reply about LabVIEW is absolutely correct. Even PHP doesn't compare to the monstrosity that is LabVIEW. The FIRST robotics competition promotes using C++ or LabVIEW to create your robot code. And I have to say, programming by connecting squares together didn't feel like programming at all. It felt like I was being infantilized. The "source code" just becomes a whole mess of boxes and lines overlapping each other and just drives you nuts trying to understand how the program works.

Even though higher level programming languages are supposed to abstract the difficult parts away from you, LabVIEW abstracts you to the point that it's a whole new level of complexity, which completely defeats the purpose of it being abstract.

hardy263··on An Architect Squeezes 24 Rooms Into 344 Square Feet (Video)
Although it would decrease the "greenness" of the home, I can imagine that making the walls motor-powered would make room switching easier. You could integrate a master controller into the wall with options for which room you want to switch to.
hardy263··on My fellow geeks, we need to have a talk.
[2]http://care.diabetesjournals.org/content/17/2/152.abstract Well, not really 10 or 20 or 30 years ago. More like 400 years ago.
hardy263··on How to Get PayPal to Freeze Your Account in Four Easy Steps
Unfortunately, most of these payment handlers only allow US companies to use their services. I'm in Canada, and I've been trying to find said services, and every one that I've found using searchyc only accepts US companies. Some of them say that international services is "in the works" or "available sometime in the future", but business cannot wait.
hardy263··on Rock-Paper-Scissors: You vs. the Computer
A statistics teachers from another class in my high school had a rock-paper-scissors game at the end of the year. But the catch was, you had to bet your mark in the game. If you won, he adds 1% to your final mark. If you lost, you lose 1% from your final mark. Of course, there was a statistics lesson at the end to be learned from it.

Even though it appears to be that you both have an equal chance to win (both of you have 33%), why would someone offer you an equal game unless he had some sort of advantage that you aren't aware of?

The trick was to look at the opponents hand while it was still going down. If you're throwing rock or scissors, your hand will be clenched the whole way down. If you were throwing paper, you will probably open your hand halfway down your throw.

So when he sees you opening your hand, midway he will change his to scissors. And if it doesn't stay open, then he will use rock, since between rock and scissors, rock will either win or tie. It required a bit of hand dexterity, but he practiced wing-chun, so it wouldn't have been a problem for him. Of course, the trick doesn't work 100% of the time, so you were allowed a maximum of two tries discounting ties, preventing kids from getting winning streaks.

It was a pretty interesting lesson, and I was glad that I skipped my statistics class to go to his.

hardy263··on Learning Programming Languages Faster
Isn't that how people who have been programming a fair amount of time do it? Or do they buy new books every time they're interested in a language?
hardy263··on Lcamtuf's blog: Possibly the most fascinating HTML parser behavior ever
I was doing some site security tests a while back, and I noticed that certain inputs got cut off or disappeared. It was a lightbulb moment when I realized that the browser was eating all the input before the angle bracket. So be careful, since this can lead to an XSS injection if you're not escaping html entities.
hardy263··on I know I belong in computer science, but sometimes I wonder.
I doubt they'll "instantly" be better than 90% of CS students, but if they're interested, they'll ultimately put in more time by themselves to learn how to program.

I remember that I was learning to program just as I was entering high school. I fell in love with programming instantly, but it does not mean I didn't spend hours upon hours debugging my first few programs to see what went wrong. But I didn't have anyone to guide me, so all my programs were imperative styled, not OOP. After taking my first computer science course in high school, my classmates thought of me as a programming genius (which I am not) since I was able to write programs faster than anybody else in my class. It's a lot easier to understand OOP when you've been programming for 1-2 years rather than 2-3 months.

That's why I'd say that a lot of programming ability is effort, not intelligence. Except for non-C family programmers, I've never met anyone who didn't have the "4-hour-debugging-session-only-to-find-it-was-a-missing-semicolin" experience when they were beginning programming.

hardy263··on Notes of a native tiger son: it's a weird time to be Asian-American
Although it's illegal, some people who read resumes look at an asian or middle-eastern names on resumes and they toss it, just because they can't pronounce it. The reason for it is because they don't want to go through the hassle of determining whether they can communicate with you or not. They can just as easily go with someone with a western name and 99% of the time they will be able to communicate with them.

I've had one person approach me and ask why asians don't keep their names, even though they sound beautiful. Like the other comments say, fitting in to have better opportunities is far more important than having a pretty name.

It's like the saying, When in Rome, do as the Romans do. (twist: if you don't have a Roman name in Rome, you're probably a slave!)

hardy263··on One Year In Two Minutes
It seems like the trees were breathing in and out. Sort of reminds me of another video with the same concept, except it was of a flower following the sun.
hardy263··on Printing 1 to 1000 without loop or conditionals
Technically, he's using relational operators if/else are conditionals that evaluate the boolean datatypes that result from the relational operation. Is it breaking the rule? Not really. Is it a loophole? Probably. The original question probably intended it to mean "no comparing" rather than "no conditional statements"
hardy263··on How Much Did It Cost AOL To Send Us Those CDs In The 90s? “A Lot,”
We got so many of them that my friends and I started using them as frisbees. Although the software was shoddy, the hardware provided some entertainment.
hardy263··on Africa’s Rural Poor Begin Harnessing the Sun
I recently bought a small dual solar/dynamo powered flashlight. 30 minutes of solar power can power the light for 10 minutes, but 1 minute of turning the crank can power the light for 30 minutes.

If the sun is out for say, 12 hours a day, that means it can power my light for 240 minutes. But turning my crank for 10 minutes would power the light for 300 minutes.

Is solar really efficient at all, because wouldn't getting a hand-turned generator get more electricity than waiting for the sun?

hardy263··on Write code like you just learned how to program
Interesting contrasting view. And you are right, we should be professionals.

But on the other hand, if you consider it as a project triangle approach, you're given "Well-designed UI, maintainable code, cheap: pick two"

And as professionals, we want to express our clients' vision as much as possible, so we have to make a balance between having good code and the budget that the client gave us. It's not really the fault of our tools and technologies, but we do try to continually improve those tools so that we can provide the best service.

hardy263··on BMW Burns Logo onto Cinema-Goers’ Eyes
Your 40-watt bulb has to be fairly close in proximity in order for the light to make things more visible. And since movie screens are so big, you have to be fairly far away in order to see the whole picture.

The energy output from light follows the inverse-square law, so double the distance is 4 times less bright, and quadruple the distance is 16 times less bright.

So although the energy output is higher, it's probably not as bad as you think it is.

hardy263··on Ask HN: Is school essentially slavery?
The problem with thinking "students can learn on their own" is that there is an autodidact culture here at HN, so that view is skewed a bit.

Most entrepreneurs have a different mindset from these people. They want to do something big like make a revolutionary product or impact the world somehow.

Most of my peers don't want to learn on their own. They just want to get the piece of paper that says "Bachelors of _________", get a well-paying job (>60k), and live a life happily ever after. They don't care about making a company, because being employed by someone else has far less risk than making your own startup.

hardy263··on Ask HN: How do you cope with loneliness?
I was in your situation a couple of months ago, but I realized that joining a club/team is the easiest way to meet people who share the same interests as you.

If you want to meet other programmers or people who are similar to you, join a CS or Robotics club. If you want to meet different kinds of people, join a sports team.

I noticed that tech people tend to float towards techy things, but a whole variety of people do sports, and that trend was visible both in high school and university. On my dragon boat team, there are people from every faculty on the team, even other CS people.

So it depends on how you want to meet people. Staying in your room programming is definitely not going to make you meet new people. If you want to know a lot of different people, a team is your best bet, because they usually have team-building games or social events where they go out to eat or have fun.

hardy263··on Engineering Is Not Science
In the US, you can call yourself an engineer whenever you feel like it, and you can put it on your resume and tell your employers that you're an engineer.

Here in Canada, it's illegal to call yourself an engineer without having a license. And it's understandable, since accredited university engineering programs are rigorous. All engineers need to study chemistry, physics, math, and you have to go through "how to be an engineer" programs that teaches you ethics, engineering tools, and safety regulations that need to be followed. The programs are not easy, and you end up having spent 4-5 years of your life mostly studying. My friends in science programs are off playing around or partying all the time, but most of the people in my engineering program are studying, with the occasional day off where they go drinking.

I'm in Computer Engineering, and when I compare my schedule to my friends in Computer Science, it's a complete joke. I have 30 hours of lectures and labs a week, while the computer science people only have 15-20. My roommate in second year computer science just games all the time. At 2AM and I'm trying to sleep, and I can still hear him playing with my other roommate, yelling across the hall.

You can also double major computer science with business. My friend is doing that right now. You can't double major engineering with anything, because there's not enough time in a day to fit in that many courses.

Most people are under the impression that the difference between computer science and computer engineering is that one is theoretical, and the other is more practical. (which is what my guidance counselor told me) But when you actually enter the program, you realize computer engineering is far more than just about computers. The running joke in Canada is that if you graduate computer engineering, you can go build a bridge. (legally, because you have an engineering stamp!)

Yes, computer science solves scientific and engineering problems. But do you really call a toddler an engineer when he builds lego stairs to reach the cookie jar on the shelf?

If so, I hope you're the only person on the bridge he builds.

hardy263··on Teen Mathletes Do Battle at Algorithm Olympics
Algorithm competitions aren't like playing Rachmaninov's second piano concerto.

It's more like playing a simpler piece that everyone knows, like Canon in D. Except you learn to play it faster than anybody else.

You're giving advice on how to be a better programmer, which is significantly different from being a programmer who implements algorithms. In a programming competition, I don't go back and optimize my code. I test to see if it works, and go on to the next question.

hardy263··on The Shadow Scholar
A 75 page paper usually takes longer than 48 hours for normal students to write. If the version history for the paper is submitted, but all the commits are within a very short time frame, then either the student stayed up all night to write it, or they paid someone else to stay up all night to write it. And if you ask them about what the wrote on on something they took all night to write, they should know it fairly well. But if they paid someone else to do it, they wouldn't know anything that's on the paper.
hardy263··on Creative business card designs
Where and what kind of business card companies make these kinds of business cards? Or do they do all the printing and cutting themselves?
hardy263··on Son, as soon as someone puts their hands on you...
If he escalates with a knife or a bat, that's no longer bullying, that's assault with a weapon. Although you could say bullying is assault, nobody is going to send the kid to juvenile for punching you. But they will sure as hell will send a kid with a knife to another place to protect the other kids.
hardy263··on Simple bouncing ball puzzle, with $50 prize
I love how there's so many calculations with energy and time. Here's my offering with just concept.

The first thing they teach you in projectile motion in grade 12 physics is that the horizontal component is independent from vertical component. That means, if you ignore friction, and you throw a ball in an arc, you'll find that the horizontal speed is linear! This surprises many people, since it's not very intuitive. You would expect the horizontal speed to be quadratic or non-linear, which is not the case. If the ball loses 40% of its vertical energy, it means that it'll just keep bouncing, but at lower and lower heights, but the horizontal speed is continuous. In fact, if given the initial velocity and angle, you could calculate the horizontal distance traveled by the ball for any point in time.

hardy263··on Proficiency of Black Students Is Found to Be Far Lower Than Expected
Although I was born in Taiwan, I moved to Canada when I was 4, so I pretty much grew up with (north) american culture.

I have to say family plays the biggest role in education. My mom forced me to learn the 9x9 multiplication tables in grade 1. By the time we actually reached multiplication tables in grade 2, I was already able to find the areas of simple shapes like circles and trapezoids.

But after grade 4, I didn't receive any extra math education, and had the same education as all my peers. Never had a tutor, and I continued to get 90s in my math courses all through high school.

You mentioned the idea of: "What's the point in trying? They won't let us succeed." And I do hear that a lot from my black peers in high school. If you say anything that can be mildly interpreted as racist, then you're in big trouble. Like "don't walk in dark alleys at night" trouble. There are outliers of course. Our valedictorian was black, and he had the second highest grades in the graduating class. (top grades belonged to chinese kid. I'd have to say that 8/10 of the top students were asian)

I wouldn't say that the "communist tyranny" had anything to do with our academic performance. I'd definitely have to say that asian culture is far more competitive than other groups. Either you get high marks, or get yelled at by your parents.

hardy263··on Ask HN: Best way to operate multiple Gmail accounts
For multiple email accounts, why don't you use thunderbird?
hardy263··on First Atomic Clock Wristwatch
Reminds me of how old cell phones used to look like. Now if only we could apply moore's law to quantum mechanics, eventually it'll reach the size of a normal wristwatch!
hardy263··on Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?
Informative: I believe the term you are referring to is Sigil http://en.wikipedia.org/wiki/Sigil_(computer_programming)

I actually never found having the dollar sign as a sigil was any problem. There are a lot of punctuation symbols used in programming that are not used the same way as they are used in English grammar. In English, you don't create a new paragraph for every line indented in, the ^ sign is not often used for exclusive or, % is not used for modulus, and * is not used for multiplication.

You could also probably make a length function which returns strlen($str) if you really wanted to have $str->length.

← PreviousPage 2 of 3Next →