News for hackers. Stuff that matters.

sparkygoblue

Consider caching your element selectors like this:

var $image = $('#my-div img');

This way jQuery doesn't have to traverse the DOM more than once to select the element.

Also, I believe you can do all of your mousedown() event code in one block.

Edit: oops, upon further inspection, I see you are doing this all in the console. Caching the selector is still possible, but now I understand why you did the mousedown() event the way you did.

Re:How Michigan took hackathons by storm. on Tuesday May 28, 2013 @01:11AM (#5778207)
University of Michigan grad here. Keep up the good work gentlemen. Go Blue!
Re:“Why are you using Node.js rather than PHP?” on Saturday May 25, 2013 @05:27PM (#5768919)
I noticed that as well. I think he was implying that the first URL structure isn't possible in PHP, which of course is not true.
Re:Show HN: Dropbox Integration For Teachers on Thursday April 11, 2013 @12:32PM (#5533003)

Show HN: Dropbox Integration For Teachers

Hello HN, I’m Brad. I have been a computer programming and technology teacher for twelve years.Collecting digital documents from my students via email or a learning management system has always been such a pain for me. Downloading the documents, writing notes, then reattaching/uploading the documents and sending them back to my students was very time consuming and tedious.I decided to start...

( Read More... | 1 comment | on HN )
Re:Beautiful PHP on Sunday March 03, 2013 @01:43AM (#5312783)
Ugh. Articles like this make me want to join the PHP sucks crowd, and I really hate the PHP sucks crowd.
Re:Obama endorses required high school coding classes on Friday February 15, 2013 @12:18AM (#5224585)
I've been teaching computer programming to high school students for close to 15 years. In that time, I've seen the demand grow more and more as the stigmatism of computer programming being a "geeky" or "uncool" pursuit has slowly dissipated.

The types of skills taught in computer programming courses -- abstraction, high-level problem solving, complex logic -- are ones I believe all students should have some level of proficiency in by the time they leave high school.

Re:Why we decided to shut down BackupMyTweets on Sunday January 20, 2013 @06:13PM (#5088692)
$1000 per month for your servers seems really high. Where are you hosting this?
Re:Why We Should All Learn a Little Code on Thursday September 20, 2012 @01:24PM (#4549593)
Re:Show HN: The code free way to use Stripe on Tuesday September 11, 2012 @05:02PM (#4507772)
I thought about creating something like this a few months ago, but I thought that Stripe would almost certainly create something like this themselves in the near future.

Either way, this looks good, and I'll keep it in mind for future projects.

Re:Why I Teach Kids to Code on Wednesday September 05, 2012 @12:56PM (#4480230)
I've been teaching kids to code for over 10 years now. It's an exciting time to be a computer programming teacher. The amount of resources (mostly free) that make teaching young people computer programming easier and far more enjoyable have grown exponentially since I started teaching. The last two to three years in particular have seen an explosion of online education sites and materials.
Thanks for the feedback Matt. I think you're right. I'm going to remove the CC info fields from my sign up form.

By the way, bugmuncher looks cool. Congrats!

Ask HN: Do you ask for credit card info for free trial signups?

I've been debating whether taking credit card info during free trial signups is the best way to go for my SaaS app. Obviously, asking for this information will turn some (many? too many?) possible users away, but it also seems like a good way to acquire paying customers smoothly (as opposed to trying to acquire credit card info once the free trial is up).I've looked at how several...

( Read More... | 6 comments | 5 points | on HN )

Ask HN: Does your web app work with javascript off?

I've spent a lot of time adding UI features to my new (mostly CRUD) webapp that I know I'm going to either tweak or totally override via javascript/ajax. I feel an obligation to get the app working with no javascript/jquery, even though I know that the group of people using the site with javascript turned off are going to very small.Is this the "right" way to be doing this?...

( Read More... | 17 comments | 12 points | on HN )
Re:I'm moving to Silicon Valley and living in my car on Thursday March 15, 2012 @01:03PM (#3709328)
You are a braver man than I. Good luck!
Re:Show HN: Landing page for our LSM Boston entry on Sunday February 19, 2012 @02:06PM (#3610053)
Seems like a cool idea.

One comment on the landing page: I'd condense the height of your design a bit. On my screen (running Chrome) the sign up for beta entry form was below the fold and I really couldn't tell it was there until I scrolled.

HTML5 Boilerplate is more of a best practices HTML/CSS template. Bootstrap is a css design framework for creating a nice user interface with little effort.

They actually have some of the same stuff like css resets and normalization, but they are used for different things.

Re:Double Fine raises $1m in less than 24hrs on Kickstarter on Thursday February 09, 2012 @08:08PM (#3574025)
This will be my first kickstarter contribution. I'm a huge fan of Grim Fandango, and I can't wait to see what they come up with.
Re:Why You Shouldn't Use Twitter Bootstrap on Tuesday January 31, 2012 @04:21PM (#3535257)
The post has a very condescending tone IMO, but there is a grain of truth to some of it though. I would say that you should incorporate bootstrap into your design, rather than let bootstrap be your design.

Disclaimer: I'm incorporating bootstrap into the design of my personal project.

Your definition of connecting with others would be close to mine as well, however, I think I could accomplish those things no matter what my everyday experience was or how much money I had in the bank.
The answers to this are on a person by person basis, but I know it doesn't have anything to do with middle class poverty or a single man living like an "average" family of four.
This may be one of the most self-absorbed, egotistical, and subtly offensive things I've seen posted on HN.

Here's something to think about: Being connected with your fellow man has nothing to do with how much money you make or putting arbitrary limits on yourself. If you think limiting your income and taking away "luxuries" in your life is going to somehow change your connections with humanity, you have no sense of what connecting with the common human even entails.

It sounds to me like you're very out of touch with humanity, and that has nothing to do with money IMO.

It appears to not quite be ready for prime time. It has crashed several times on both my PC and Mac laptop.
Re:APress: all ebooks $15 today on Monday November 28, 2011 @12:31PM (#3286745)
O'reilly is also running a Cyber Monday sale:

http://shop.oreilly.com/category/deals/cyber-monday.do

Re:Early Interview with Mark Zuckerberg (2005) on Saturday August 13, 2011 @06:47PM (#2882182)
His description of what he wants "The Facebook" to be seems so limited at this point. He really doesn't have a clue what he's stumbled into...
Re:Free full video course on CSS3 on Tuesday June 28, 2011 @08:34PM (#2707954)
The videos explaining borders, gradients, typography, animation, media queries, backgrounds, selectors, and typography are all free to view.

Lots of good stuff here IMO.

Older »