You may not write production code until you have written a failing unit test.
I mean, they already make awesome mice and keyboards.
Apple don't let anyone use their software on hardware that's not vetted(read: sold) by Apple. While this seems draconic, it makes sense to the extent of reducing compatibility issues.
If you don't have to worry about the environment your software will run in, you can focus on making it more user firendly or faster. You can take the time you spend on making sure you cover all the edge cases and spend it on UI. Furthermore, you can leverage the limits of your hardware and optimize for the supported range.
Plus, this way, you unify your audience's desires. It's easy to want a Mac, because there are only a few to choose from. Whether you want a Mac or not is an entirely different issue, but once you decide you want a Mac, it's fairly easy to choose. If you want a PC, you then have a thousand more choices as to what make and model and then colour and then OS and then maybe OS version. It's choice overflow, and we know it does not solve problems, rather it generates them.
This stands for mobile phones, too. It's easy to want the Apple phone: there are 4 versions, and only one is the latest. If you want a Windows Phone 7 or an Android phone -- boy do you have where to choose from. I'm not even going to talk about low-end phones. That market is a mess.
So if Microsoft did make a laptop, they could optimize their OS for the range of configurations they would offer and rebudget of time spent of compatibility to improving their users' experience. I would love that. And I think there's a whole bunch of you who would like that too.
But hey, what do I know? I want a Mac myself.
Now go poke a friend on facebook or something.
The old top toolbar did give me quick access to my favorite Google services, but let's face it, it looked like it was made in 1999.
Enter the new, slick, more usable toolbar!I love it to bits and I cannot wait for it to roll out to other Google services, like Reader!
I will keep this short and I hope this will help you avoid some of the headaches localStorage has given me.
localStorage saves everything as string, so false gets saved as the string "false" which, when loaded back from localStorage, evaluates to true. Use null as that will eval to false, or build a special parser.
In some cases, it can take out any smoothness your user experience had. Whenever you assign a value to a localStorage key, the browser takes some time for IO -- and that freezes it for a little bit. Try to group writes and make sure you write only when you need to.
Consider this example, and check the profiling screenshot:
$.window = $(window);
function save_position(){
localStorage.y = $.window.scrollTop();
}
$.window.scroll(function(){
$('body script');
save_position();
});Saving to localStorage takes up most CPU time! Not only does it do that, but it also blocks up the scrolling and it I feel like I'm back in '99.
Now here's an optimized version:
var write_timeout = null;
$.window = $(window);
function save_position(){
localStorage.y = $.window.scrollTop();
}
$.window.scroll(function(){
write_timeout && clearTimeout(write_timeout);
$('body script');
write_timeout = setTimeout(save_position, 500);
});This yields the folloing profile:
I think this logic applies to when ever you have to save information during user interaction: use a throttle cap. In this case, a setTimeout.
Z-Type is the best typing game I've played so far!
It's like Space Invaders for people that need to type a lot(read: developers) and it's loads of fun, especially when you get to the higher levels.Go try it out yourself! http://www.phoboslab.org/ztype/
-- Kyle Neath, It's not about how many hours you work
Because we're teaching the new ones a bunch of crap they're not likely to use.
What I mean is: Why are we teaching them how to use a t-square if they are going to spend the rest of their adult life working on a computer?
Is it because it stimulates a certain way of viewing things?
Is it because all the great architects start mocking things up on paper?
Or is it because that's the way their teachers studied?
When I was doing my major in CS, I took a course for algorithmics. It was a great course, taught by a great teacher and I learned a lot of funky algorithms and a bunch of tricks as well-- but all the implementation of said algorithms was done in C. C! I have never written a single line of C production code. Nowadays, the same course uses Python as a support language and I think that makes a lot more sense -- since the focus should be on algorithm efficiency, not language short-comings.
I see the introduction of Python as a big step forward -- but that might be too little, too late. And what about architecture?
What do architects actually use from what they have to study during college?
What do Computer Science grads use from what they learn in college?
Do they?
image source for the t-square.