|
There's been a lot of press lately about Udacity lately, and how it provides a Stanford-quality education to everybody for free. It doesn't. I think it's great that the course material and lectures are available for free online to anybody who wants it, but I also think most of what you learn in university is learned outside of classrooms.
People who replace a conventional university education with an online education thing like Udacity may well learn all the course material (and maybe even do better on standardized testing of that material) but I have no doubt that they will end up losing something in the bargain. Good universities provide opportunities for cross-pollination of ideas and people in a way that's much harder to replicate online, and in my opinion losing that is like throwing out the baby with the bathwater. It's not an easy thing to measure though, so it won't even be obvious that it's gone until many years from now :(
[ 1 Comment... ]
I wanted to try writing an add-on for the new Firefox for Android. So I did. I saw a lot of comments in the Google Play store complaining about lack of text reflow and readability in general, so I decided to implement something that might help with that. It ended up a little different from what I had initially imagined, but it does help when you try to zoom in to a block of text by double-tapping, and it's still too small to read.
Basically the add-on grabs the text you double-tapped on, and bumps up the font size on it so that it is at least 0.5 inches tall at the new zoom level, which should make it readable. If you double-tap on it again to zoom out it gets restored to how it was originally.
You can see the source on Github: staktrace/taptapwrap, or grab the XPI. It works on all currently-available versions of the new native UI Fennec (14, 15, 16). Feedback (and pull requests) are very welcome.
If you would like to try writing an add-on, I would suggest starting at this page: Addons developer guide. It took me a while to find that page among all of the other addon-related wiki pages (and in fact I started my addon my grabbing Matt Brubeck's Phony addon and replacing chunks of it with my browser.js monkey-patching).
[ 6 Comments... ]
So the new-and-improved Firefox for Mobile, that thing I've been working on for the last ~8 months, is finally out. If you have an Android smartphone (ARMv7 processor, Android 2.2+) you should try it out! You can get it from Google Play.
The current release doesn't support tablets, unfortunately, but if you have a tablet and want to try out the new awesomeness, you can grab the latest Aurora build or if you're feeling adventurous, the latest nightly build. Those builds also have many more improvements that didn't make the release cut, so if there's something you find lacking in the release version feel free to give those a spin or let me know and I can file a bug.
[ 4 Comments... ]
I'm attending the Velocity conference this year, and I figured I'd post about some highlights here. Two of the sessions I attended were related to mobile web development, and were quite interesting. The others were focused on web operations (scaling/reliability of the servers) - still interesting, but stuff I have less experience with. The two mobile web talks were:
Mobile Web Performance by Estelle Weyl
Slides: http://estelle.github.com/mobileperf/
Quick summary: People don't like their battery drained! Estelle had lots of excellent tips on how to make your web apps efficient. I particularly liked the tip to reduce HTTP request latency on mobile devices by stuffing the resources into browser localstorage on the first page load, and then loading it from there afterwards. Also definitely the tip to avoid using radial gradients - that's been the cause of a few of the Fennec performance issues, and we have bugs filed on those. I really liked how she emphasized that all of these tips are things that may or may not apply depending on the particular site you're trying to optimize.
Taming the Mobile Beast by Matt Welsh and Patrick Meenan
Quick summary: The mobile web has completely different performance characteristics than on desktop! For example, latency is a killer when it comes to mobile web performance. Beyond ~2Mbps bandwidth has almost no effect on page load time; it's all about the round-trip latency. A lot of their content (e.g. carrier proxies screwing with content) was familiar to me from working on the browser back at RIM, but some parts were new to me. For instance, their overview of the cell radio state machine was interesting - the talked about how the cell network can drop the device channel if it goes idle, increasing latency on the next request. I also really liked how they emphasized the sheer number of variables when it comes to measuring mobile performance, including hitting data caps on your test devices near the end of the billing cycle!
[ 0 Comments... ]
I just landed bug 755971 on mozilla-inbound. Assuming it sticks, it changes the scrollWidth and scrollHeight properties on non-scrollable elements so that it doesn't include the border of the element. This means that for an element that looks like this:
<div style="display: table; overflow: auto; width: 100px; height: 100px; border: 5px solid black">foo</div> the scrollWidth and scrollHeight change from 110 to 100.
This behaviour is poorly specified and not consistent across browsers, but this brings Firefox more in line with the definitions in the CSSOM-View specification. It also makes the behaviour consistent across scrollable and non-scrollable elements - in both cases it now returns the padding box size. The behaviour for scrollable elements is unchanged.
Although this change makes sense in general, the reason it came up is because some of our code tries to detect if elements are scrollable by checking if their scrollWidth (or scrollHeight) is larger than their clientWidth (or clientHeight). This check was returning true in cases where non-scrollable elements had a border. By the looks of some questions on stackoverflow, this seems to be a general problem people are encountering, so it made sense to fix.
[ 4 Comments... ]
Same disclaimer and meta-information applies to this post as my previous posts (Nutrition 101, Nutrition 102).
(Since I wrote nutrition 101 about sugars and 102 about fats, I was planning to make 103 about the final macronutrient group, proteins. But honestly I don't think I understand proteins well enough at this point to explain simply; so rather than hold up the series any longer I'll jump ahead and get back to proteins later.)
pH balance
So, let's talk about pH balance. pH is a measure of acidity/alkalinity on a scale of 1-14; 1 being the most acidic and 14 being the most alkaline. 7 is considered neutral, and your blood must remain in the range of around 6.8-7.8 in order for you to stay alive (usually it stays in the 7.3-7.4 range). This is absolutely critical, and so it makes sense that your body has all sorts of mechanisms to try and maintain your blood pH in that range.
One of these mechanisms is leaching calcium from your bones. That is, if your blood pH starts dropping towards the acidic side, you body starts breaking down bone tissue and releasing calcium; this triggers chemical reactions with a net alkaline output, and brings your pH back into balance. Over time this can lead to softer bones, osteoporosis and all sorts of other bad things.
So how can you prevent this and keep your pH in balance, you ask? Good question. Here is a link that shows you which kinds of foods are acid-inducing and which kinds of foods are alkaline-inducing: A list of acid/alkaline producing foods. Note how pretty much all fruits and vegetables (surprisingly, even acidic things like citrus fruits) are alkaline-inducing, and pretty much anything else is acid-inducing. Eat your veggies!
Calcium/potassium balance
Just as an addendum, if you're concerned about bones, another thing to watch out for is your calcium/potassium intake. If you don't eat enough calcium your body will use potassium as a replacement (they are chemically similar) in bone tissue. However, potassium is much softer than calcium, and again leads to softer bones and more chance of osteoporosis.
[ 0 Comments... ]
I was reading Peopleware (excellent book, everybody in the software business should read it) and I found this particularly surprising:
During the 1960s, researchers at Cornell University conducted a series of tests on the effects of working with music. ... To no one's surprise, participants in the two rooms [silent room and room with earphones+music] performed about the same in speed and accuracy of programming. ...
The Cornell experiment, however, contained a hidden wild card. The specification required that an output data stream be formed through a series of manipulations on numbers in the input data stream. ... Although the specification never said it, the net effect of all the operations was that each output number was necessarily equal to its input number. Some people realized this and others did not. Of those who figured it out, the overwhelming majority came from the quiet room.
Many of the everyday tasks performed by professional workers are done in the serial processing center of the left brain. Music will not interfere particularly with this work, since it's the brain's holistic right side that digests music. But not all of the work is centered in the left brain. ... The creative leap involves right-brain function. If the right brain is busy listening to 1001 Strings on Muzak, the opportunity for a creative leap is lost.
What do you think? Do you like listening to music while coding? Do you find it affects your creativity and/or productivity?
[ 11 Comments... ]
Scott Adams had a post yesterday called No Banks on Mars. It was kind of interesting to me, since I've been thinking about the banking industry in general recently. I mostly agree with what he's saying, but think that there's an alternate system that could exist alongside traditional banks. He's right in that the loan business is where banks make their money - they're basically a middleman between people making deposits and people getting loans. And they make billions of dollars doing it. What if we could eliminate that middleman and use the Internet instead?
What I'm thinking is that the loan side of banks can fundamentally be replaced with a peer-to-peer crowdfunding site. This website would have a set of properties:
(1) allow anybody anywhere to participate as both lenders and borrowsers
(2) allow borrowers to specify how much interest they are willing to pay on their loan
(3) allow lenders to fund partial loans
All of these properties exist on various microfinance websites today, but I haven't found one that does all of them together. See for example Kiva, Amifi, Prosper, Zidisha and so on.
Right now I think Zidisha is the closest to what I'm thinking, because they follow (2) and (3) without using any intermediate agencies. However they don't let just anybody sign up and ask for loans, they're focusing specifically on borrowers in Kenya, and are still somewhat playing the "it's cool to help out developing nations" angle. From a financial point of view that angle is irrelevant, though, and it's still a reasonable way to make for lenders to make a decent return on their investment.
Prosper.com is also good, and is one of the ones that takes out the "help developing nations" part of it, and just has the peer-to-peer crowdlending stuff. Unfortunately it's only restricted to the US right now, as far as I can tell, so I haven't been able to try it out.
Websites like these are already great because they allow borrowers to get loans that they wouldn't otherwise be able to get, or at lower rates. They also allow lenders to earn higher interest rates on their investment, and allows them to diversity their investment portfolio much more (i.e. imagine lending $50 to 100 people each instead of having to sink it in some mutual fund which may or may not make money). Everybody wins.
What of fraud, you ask? People could sign up as borrowers and then just run off the with money. With a bank at least you're insured against that, you say. This is the trickiest part of it, I think, but this problem can be mostly solved by having reputations assigned to people. If they repay their loans on time then their reputation goes up. If you don't want to make a risky loan, then don't lend money to somebody with a low reputation. There are other approaches that could be borrowed from other fields and applied here too. I bet eBay has a lot of fraud detection heuristics and algorithms that could be adapted to this purpose. I'm sure there are other techniques as well that are more in line with the idea of a reciprocity network.
[ 2 Comments... ]
A lot of you probably know this already, but I thought I'd put it here anyway for future reference. Now that we've released Firefox for Android Beta, we're getting a lot of bug reports of various websites that behave unexpectedly or just plain don't work (this is great, keep the bugs coming!). Often it turns out that the page is just poorly designed for mobile browsers, and the problem isn't really in the browser but in the mobile-specific content that is served to us.
As one of the first steps when investigating bugs of the kind "Site X misbehaves in Fennec", I always check to see if I can reproduce the behaviour in desktop Firefox using the User Agent Switcher add-on to get the mobile-specific content. The User Agent Switcher add-on is great because it lets you modify the fields (User-Agent HTTP header and some window.navigator properties) that pages often use to do mobile detection. By using a desktop browser with Fennec UA properties, I can narrow down the scope of the bug as being a Fennec-specific bug, a Gecko core bug, or a website error.
If this is useful to you, you can get the addon here. It doesn't come with the Fennec UA settings by default, but allows import/export of settings. I have the XML file for Fennec 15.0a1 (current nightly) available for download here. I also have a page that shows you the necessary UA settings for any browser - just navigate to this page in the browser whose settings you want to see.
There is a caveat though: some websites use other forms of UA detection to serve mobile-specific content. For example, CSS3 Media Queries is one way to do it. I haven't run into too many sites that do this, but that number will (hopefully) grow, so it's something to keep in mind.
[ 3 Comments... ]
I've heard the phrase "web scale" come up a few times recently, and it's kind of been simmering in my mind, so here are some random thoughts to help exorcise it.
Web scale is huge. When you scale things up to the web, you're often scaling things up by a factor of millions or more. There's a huge difference when you're dealing with things at that scale. Events that have a one-in-a-million chance of happening actually do start happening when you're at web scale. This is both bad and good.
Companies like Google and Facebook like operating at web scale, because it gives them a lot of power. They are able to take little itty-bitty pieces of information about their users that individually are almost worthless, but in aggregate is worth billions of dollars. Their users pay a cost in terms of privacy; many do this by choice. However, there's also a different cost that is paid by a few, the cost of a one-in-a-million catastrophic event. If Google accidentally loses the data of .0001% of their users, they might not care very much or try very hard to fix it. At web scale, though, that .0001% is a lot of users, and those users basically get shafted. That's why web scale is scary.
But the same one-in-a-million events also work in our favour. There are lots of stories out there of somebody needing some help, reaching out on the web, and finding it. People separated by continents coming together to work towards a common goal. That, too, is a function of web scale. It may not be easy to find someone on your street or in your town who shares your particular goal, but on the web, you can find those people and make things happen. That's why web scale is good.
The web reminds me of the famous quote by Archimedes: "Give me a place to stand and with a lever I will move the whole world." The web is like that lever; it provides the potential to move the world, but only to those who can wield it. Personally I don't believe that such power should be concentrated into the hands of a few. The web should remain accessible to everyone, regardless of who they are, where they're from, the language they speak, or anything else. It's the only way to prevent an imbalance of power and keep the playing field even.
Easier said than done, though. At web scale the only way to accomplish that is to empower the users themselves. If you put out a product for five individual users, it's easy enough to customize it to suit their individual needs. If you put out a product for five million users, it's impossible. Even a well-understood thing like language localization becomes hard at web scale, because you might find that one of your five million users only speaks languages you don't do localization in. The only way to do it is to give your users the power to do it themselves.
That's why maintaining open standards and decentralizing systems is important. They shift the balance of power back to the users where it's sorely needed. If you're building a product, they let you avoid forcing your users into becoming victims of your scale. It's just one of the many reasons I'm glad I work at a place like Mozilla, where ideas like user sovereignty are built right into our mission and manifesto. But Mozilla operates at web scale too, and we have to be careful that we don't end up victims of our own success, by growing too big too fast and forgetting that scale changes everything.
[ 1 Comment... ]
|