Most recent posts: page 1 of 6
1 2 3 4 5 6
Browse the complete archive by category or month.
August 19, 2008
Cross-browser rounded vector corners

As a web developer, I've been patiently waiting for the designer community to finally decide that rounded corners and drop shadows are out of style. I've been waiting since about 1999 so, uh, you know, any day now guys. I'll just be waiting here in web developer hell trying to construct a cubic igloo.
There are a number of tricks for creating roundtangles, from nesting a bunch of divs with background images, to jQuery scripts that will dynamically build successive 1-pixel-thick divs to render the corners. Today, I came across another method which simulates the CSS 3 border-radius vector corner effect in most browsers, using a little bit of conditional HTML and a bunch of browser-specific CSS properties.
You'll have to check the source on the linked page below to see how it's done, but basically VML is used for IE support, and the -moz-border-radius and -webkit-border-radius properties are applied for Firefox and Safari users.
It wouldn't be a difficult task to simplify this a bit with jQuery and roll all of the necessary markup and css tweaks inside a single class target.
Posted by Jason Striegel |
Aug 19, 2008 09:06 PM
Design, Web |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 18, 2008
Beagle Board - ultra tiny, 2-Watt Linux system

Hackszine pal Patti Schiendelman tipped me off to the Beagle Board, a spartan little embedded platform, perfect for all things hackable. It's based on the TI OMAP3 processor, which is packaged with 128MB of DDR RAM and 256MB of NAND Flash all on the single chip in the center of the board.
Instead of including things like ethernet and 802.11 on-board, they opted to keep the footprint small and only include the bare essentials: DVI for monitor output, SD/MMC for storage, audio in/out, and USB for device expansion. If you need any other hardware, just get a USB device that has a Linux driver.
Did I mention it's $150 and draws less that 2 Watts? This is definitely what you need for your next autonomous spy weather blimp.
BeagleBoard.org
BeagleBoard Embedded Linux Wiki
Linux Journal - The BeagleBoard: $149 Linux System
Posted by Jason Striegel |
Aug 18, 2008 09:06 PM
Electronics, Hardware, Linux, Ubuntu |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 17, 2008
Olympic proxy - how to watch location restricted content

It sounds like I'm not the only one bummed out about the NBC/Microsoft/Silverlight version of the olympics. Hackszine reader No Dust writes:
How do you view the Olympics on the Internet? NBCOLYMPICS.COM only shows popular games in the U.S., and missed many good games. I went to other international web-sites in China and England (bbc). All their video-streaming have been blocked for the U.S. region.I heard about Proxy server stuffs... if there anything we can do to by pass their "region" check on our IP address and browser info?
There are a number of sites that are distributing recorded or live olympics content online, but due to their licensing agreements, they only show content to a restricted location. The provider looks at your incoming IP address which can determine your country of origin and your permission to view the video they provide. To get around this restriction, you need to find a proxy server in an allowed location. Here's how to do it.
Choose A Site To Watch
China Central Television (CCTV) has a big list of rights holders, by country, that are officially licensed to broadcast olympic games content online. Go to the CCTV Olympic Games internet rights holders list, and select a URL that you want to view. Then, see which countries are associated with that URL. You'll have to find a proxy in one of these countries to view the content.
Try and find a licensed country that is likely to have a decent internet backbone and infrastructure. When you look for a proxy server, you'll have better luck finding one with a speedy connection. For instance, YouTube has an Olympics channel at http://www.youtube.com/beijing2008. To view anything at that URL, however, you need to be in one of the approved countries. There's a big list to choose from, but you might want to go with South Korea instead of Afghanistan.
Find A Proxy
There are a bunch of proxy servers around the world that allow anyone to use them, typically called open proxies. You'll need to search a bit to find one that is currently online, but there's a decent, regularly updated database of open proxies at xroxy.com that does a decent job.
If you're searching for South Korea, just select it from the country list, and you'll find a number of open proxy servers, along with their latency and uptime information. Try to find one with really low latency, but keep in mind that if it has a low reliability measure, it's less likely that it'll be online.
Scribble down the IP address and port number for a couple proxies in the list. You'll need that information to configure Firefox.
Configure Firefox To Use A Proxy
In Firefox, go to preferences->advanced->network->settings. There's a radio button that specifies whether to use a proxy or not. Choose "Manual proxy configuration".
Most of the proxies in the list would have said "Transparent" in the proxy type column and use port 8080. Assuming that's the case, you want to type the IP address you saved in the "HTTP Proxy" input field, and "8080" in it's associated "Port" field. If it was a SOCKS proxy, do similar, but in the "SOCKS Host" field, and make sure to select v4 or v5, as appropriate.
See If It Worked
Once you've saved you settings, you should be able to go to the view content that wasn't previously available to you. You'll notice that your connection is a bit slower, since everything is being funneled through a server in another country, but in most cases, this will work out. If you can't connect through the proxy, or if your connection is really slow, just try another proxy from the list.
When you're done watching, make sure to go back to your settings and turn off the proxy by choosing the "Direct connection to the internet" option. If you leave the proxy settings in place, your connection will be slow and everything you browse will be funneled through the proxy server - probably not what you want.
That's really all there is to it. Good luck!
Posted by Jason Striegel |
Aug 17, 2008 07:59 PM
Web |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
Use iPhone version of Google Reader on your Mac

I'm fond of iPhone-specific versions of web sites; they usually have just the minimal set of features you need and are very easy to use. Adam Darowski just posted a great way to get the iPhone version of Google Reader running on a Mac as a desktop app:
Do you find yourself checking feeds on your iPhone and thinking, "Man... I wish Google Reader looked like this on my computer, too." I have. Using Fluid.app and a bit of user agent trickery, you can make it happen...
Read all about it; thanks to Adam's instructions, you can get this going yourself in minutes. Using Fluid.app to Bring Google Reader for iPhone to your Desktop
Posted by Brian Jepson |
Aug 17, 2008 01:16 PM
Google, Mac, iPhone |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 16, 2008
Free airport WiFi
Most solutions for getting around the captive portals used in $7 airport wireless services involve sniffing the network and spoofing authenticated MAC addresses. I stumbled across an old post from 2006 by Felix Geisendörfer who discovered that some of these proxy systems are set up to allow pictures through before payment.
Presumably this is to allow external custom imagery and analytics tracking bugs to be accessed during the sign-in process. The funny thing is that the proxy allows files through based on a string comparison on the requested URL, and it's easily fooled.
Without any hope of success I typed http://www.google.com/.jpg into my browser's adress bar, and to my big surprise I saw the page you see when you follow the link right now. The next thing I typed in was: http://www.google.com/?.jpg but that didn't work. But I went on, and found that url's like http://www.google.com/search?.jpg worked like a charm. I found that I could easily visit sites like slashdot, google, or even this weblog, when adding a ?.jpg at the end of the url. The next logical step was to automate that. I downloaded greasemonkey.xpi?.jpg (*g*) and wrote a 4 line js script that would add ?.jpg to every link in a document. That way I was able to browse most sites without a hassle.
I wonder how prolific this loophole is. Next time you're in an airport (or a hotel), give it a shot and let us know how it works for you.
Hacking a commercial airport WLAN
Posted by Jason Striegel |
Aug 16, 2008 09:29 PM
Travel, Wireless |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 15, 2008
iPhone screen capture
With the new 2.0 firmware, you can take a screen capture using an easy key combo. Just hold down the home button and press the power button briefly. If you hold it for several seconds, the phone will soft reset, but if you just press and release, you'll see the screen flash and an image will be stored in your photos folder.
This ought to come in handy if you're doing any programming, web-based or native, on the iPhone. Nothing beats having a screenshot during QA to help document problems.
Posted by Jason Striegel |
Aug 15, 2008 09:45 PM
iPhone |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 14, 2008
Wii DVD player

Team Twiizers is at it again, releasing a Wii port of the MPlayer media player. If you've already added the homebrew channel, you just need to download an install a couple of files to get things working.
You can read more details about the port at HackMii and WiiBrew. There's also a convenient instructable to hold your hand through the install. It seems silly that Nintendo didn't release this as a built-in feature, but at least you can get it working on your own now.
Instructables - Use Your Wii As A Dvd Player
WiiBrew - Homebrew apps/MPlayer
HackMii - libdi and the DVDX installer
Posted by Jason Striegel |
Aug 14, 2008 09:33 PM
Gaming, Home Theater |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 13, 2008
Korg Kaossilator 4-bar loop hack

I apologize if this is a bit of a niche hack, but I've had my eye on Korg's little pocket synthesizer and then David Battino showed off some impressive audio samples on the digital media blog that he was able to create with a hidden Kaossilator feature:
What loosened my credit card was a secret hack Korg revealed during fact-check: If you power up the Kaossilator while holding down the Tap and Loop Rec buttons, the loop memory doubles from two bars to four. That may not sound like much, but it gives you time to set up tension and release; I find four-bar loops just breathe better.
The tweak disables the undo functionality and trades it for double the loop length. A fair trade, I think.
I noticed we're running a little low on music-related hacks lately. If you've got anything you'd like to share with the rest of the class, please send it in!
Korg Kaossilator 4-Bar Loop Hack
Posted by Jason Striegel |
Aug 13, 2008 11:05 PM
Music |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 12, 2008
HOWTO - Protect GMail from session snatching
By default, Google Mail sets a session cookie that doesn't have the secure flag, meaning that if you log in to GMail, leave, and later return to the unencrypted "http://" URL (instead of "https://"), your browser will transmit your session information in plain-text to the server. This problem gained some attention last year and we mentioned a couple of strategies to get around the problem, either by using a Firefox plugin, or by only using GMail and logging out before browsing other sites.
A tool was recently released called Surf Jack, which is demonstrated in the video above. Surf Jack makes it incredibly easy to steal the credentials from another user's GMail session. An attacker could take this into a typical coffee shop, wait for someone to check their mail, and then harvest their session. This gives the attacker complete access to anything confidential that the victim may have in their inbox.
Thankfully, since the problem was identified last year, Google added an additional setting in the GMail settings panel that fixes the problem. It looks like this:

If you go into the Settings panel, choose "Always use https", and save your changes, GMail will change its default behavior and use the secure flag on its session cookie. From that point forward, you'll no longer be vulnerable to GMail session snatching, regardless of what machine or browser you use to check your mail.
I'm not sure why this isn't the default value, but it isn't, so go change it.
Surf Jack - HTTPS will not save you
Posted by Jason Striegel |
Aug 12, 2008 09:04 PM
Gmail |
Permalink
| Comments (3)
| TrackBack
| Digg It
| Tag w/del.icio.us
10 Google Apps Tips
1. Create special email addresses to better filter your mail

This one's an oldie but goodie. If you're using Gmail, you can append "+something" to your name in your email address to better sort incoming mails. For instance, if your name is John Doe and you wanted to separate work mail from family mail, you can use "john.doe+work@gmail.com" and "john.doe+family@gmail.com"... and then create a filter in Gmail to differently label incoming mail to these two addresses. Just use the Create a Filter link in Gmail, and enter your customized email in the "To:" field.
On that note, you can also remove the dot in the name of your email -- as in "johndoe@gmail.com" -- and messages still reach you fine. (On yet another note, is there anybody out there who's actually really named John Doe? He must get an awful lot of spam.)
2. Check the online discussion of your blog posts
If you have a blog, you might want to check who talks about the things you post. There are many ways to go about this, and one involves Google Blog Search. Just type the full URL of your blog post in question -- say, http://example.com/archive/102.html -- and hit the search button (you can also use the "link:" operator preceding your URL, though Google adds that one automatically for you). To the right hand side you can now sort the results by date, and you'll see the latest other blogs linking to yours.
As another interesting way to keep updated on discussions circling around your blog, company or person, you can also use Google News Alerts (for extra usefulness, include spelling errors in alerts you set up -- like ["acme inc" OR "amce inc"]).
3. Prepare to be moved away from Google Page Creator
This is more of a warning than a tip... if you're currently using Google Page Creator as a website creation tool, note that Google on their help page for this service announced they're slowly closing it down! Instead of Google Page Creator, Google say they shifted their focus on the newer Google Sites, and new sign-ups for Page Creator are not accepted anymore. Google writes, "If you are currently a Page Creator user, you can continue to use Page Creator and your pages will automatically be transitioned to Google Sites later this year. We are committed to making this transition as smooth and easy as possible, and we will post more details as we get closer to the transition time. You can also manually move your web pages from Page Creator to Google Sites or other service providers at any time."
4. Get a replacement for Google Answers

Have you ever had a chance to see the Google Answers service while it was still active? Google shut it down for actual usage a while ago, but while it was live, it was a nice service to ask a paid question and then have a researcher get back with an answer to you (somewhat similar to Yahoo Answers, but in higher quality... if I may say so as an ex-Google Answers Researcher in 2002). However, there's a cool replacement for this service: Uclue. In fact, they have nothing but ex-Google Answers Researchers on board; I'm using that site quite a bit myself.
5. Create a quick link to your unread mails
You might have heard of the Gmail Labs which allows you to opt-in to special, prototypical features. I just wanted to mention my favorite experimental feature of them all: a Quick Link to your unread mail. Now first of all, let me say there's several user types in Gmail (as Gmail designer Kevin Fox explained), and if you're the kind of Gmail user who archives mails as soon as they're read, you won't need the following tip. If, however, you let everything flow into your inbox but you don't like to archive read mails, creating an "Unread mail" quick link comes in handy.
To do so, just click on Settings on top and switch to the Labs tab. Check the "Enable" box next to Quick Links. Approve by hitting Save Changes at the bottom. Now search Gmail for [in:inbox is:unread] (without the square brackets) and in the Quick Links box appearing to the left side, click Add Quick Link. Enter "Unread" for the title and approve the dialog. Next time you want to see all your unread mails in one go, just click the Unread link to the left!
6. Automatically expand spreadsheet sets

Are you using Google Spreadsheets as your web-based spreadsheet editor alternative to desktop programs like Excel? If you do, give the "magic" auto-completions a try. To understand what this does, enter "Superman" in the top left cell, and enter "Batman" and "Wonder Woman" in the cells below. Now select all three cells you created. Hold down the Ctrl key, and drag the bottom right corner of the selection downwards over the other cells. Notice something? Your list is now continued with entries like "spider man", "x men", "green lantern". (Admittedly, not all continuations make sense -- "star wars"? -- but where would be the fun in magic without surprises.)
What's happening here? Well, the Google Labs have a member called Google Sets. (Being from 2002, it's the oldest member still listed in the Labs, too.) This tool automatically expands a given set of items. Like "Batman" and "Superman", but also anything else that could be thought of as a group. For instance, entering "google" and "yahoo" also shows "altavista", "lycos" and "msn". Entering "tom cruise" and "nicolas cage" yields "brad pitt", "angelina jolie", "johnny depp" and others.
7. See the images of a website
Do you want to get to see only the images of a particular website? You can, by using Google Image Search in combination with the "site:" operator. To see all images Google crawled on Makezine.com, for instance, you'd search Google Images for site:makezine.com. This returns around 44,800 images, though as things go, Google will restrict you to look at around the first 1000 pics. Note that you can combine this search type with other keywords, too -- like the keyword "screenshot" -- and you can also mix it with other settings from the advanced image search page... like by checking the "faces" box to show faces only (with 117 results for that one on Makezine.com).
8. Use the Google Toolbar to translate a document

I like my Firefox browser relatively uncluttered but there's one or two features I don't want to miss... like the Google Toolbar's "Translate Page into English" functionality. You can find it as part of the Google Toolbar for Firefox. On any page you're on, you can click the arrow icon next to the translate button, and pick Translate Page into English. The translated page will load in place of the original one after some seconds. Not only is this approach quite quick, it's also useful if you're not sure which source language the page in question is held in (like when you check discussions in other blogs by using tip #2 above).
9. Search through several sites at once
If you often search through a set of sites to discover something, creating a Custom Search Engine can be helpful. Already in a normal Google search, you can enter something like [site:makezine.com google] to get all Make posts containing the keyword "google". But what if you want to have results on that keyword from all O'Reilly blogs?
First, let's assemble a list of some O'Reilly blogs. Open up oreilly.net/blogs/ and note down the URLs of the sites printed in the footer, like http://radar.oreilly.com, http://ignite.oreilly.com, http://craftzine.com, http://makezine.com and http://hackszine.com. Now jump to the Google Custom Search Engine service and hit the "Create..." button. Name your search engine -- like "O'Reilly Search" -- and provide something for the other fields as well. Leave the "Search engine keywords" field empty, but in the "Sites to search" field, enter the URLs you assembled above one by one. Hit the Next, and then the Finish button, and you're done. You can now visit your Google Custom Search Engine's homepage (as listed in the dashboard) and enter a keyword as usual -- you'll see the results will be restricted to those hosted at the sites you previously provided.
10. Find online content to re-use
Do you want to find content on the web you can re-use on your blog, homepage, and other places? The Creative Commons license comes to the rescue. Creative Commons is an effort to bring a more relaxed copyright system to people in order to better share and re-use content (check out their homepage to see how you can license your content as Creative Commons).
To search for content using this license only, skip Google's normal search box and go right to their Advanced Search, as linked from the Google homepage. On that page, expand the part linked as "Date, usage rights ...". Select "free to use or share" or a similar license in the "Usage rights" field, and enter a keyword on top as usual. Now when you hit the Advanced Search button, you'll note how pages in the results are using the CC license; clicking on the respective license on a page will let you know what specifically you can do with this content, as there are different CC frameworks available.
From the Maker Shed:
Google Apps Hacks by Philipp Lenssen - all about Google Docs & Spreadsheets, Gmail, Google Calendar, Google Presentations, and more! Price: $29.99 Buy it in the Maker Shed
[This post originally appeared at Lifehacker]
Posted by Philipp Lenssen |
Aug 12, 2008 07:29 AM
Gmail, Google, Hacks Series |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 11, 2008
Super Mario World and quantum physics
You may recall a post last month about Kaizo Mario, the ridiculously cruel fan-made Super Mario World level. Hackszine reader Guy Russell sent us a link to an article on the Mechanically Seperated Meat blog that uses this level to visually illustrate the concept of the "Many Worlds Interpretation" of quantum physics.
One good example of this is the Quantum Suicide "experiment" that some proponents of the Many-Worlds Interpretation claim (I think jokingly) could actually be used to test the MWI. The way it works is, you basically run the Schrödinger's Cat thought experiment on yourself- you set up an apparatus whereby an atom has a 50% chance of decaying each second, and there's a detector which waits for the atom to decay. When the detector goes off, it triggers a gun, which shoots you in the head and kills you. So all you have to do is set up this experiment, and sit in front of it for awhile. If after sixty seconds you find you are still alive, then the many-worlds interpretation is true, because there is only about a one in 1018 chance of surviving in front of the Quantum Suicide machine for a full minute, so the only plausible explanation for your survival is that the MWI is true and you just happen to be the one universe where the atom's 50% chance of decay turned up "no" sixty times in a row. Now, given, in order to do this, you had to create about 1018 universes where the Quantum Suicide machine did kill you, or copies of you, and your one surviving consciousness doesn't have any way of telling the people in the other 1018 universes that you survived and MWI is true. This is, of course, roughly as silly as the thing about there being a universe where all the atoms in your heart randomly decided to tunnel out of your body.
But, we can kind of think of the multi-playthrough Kaizo Mario World video as a silly, sci-fi style demonstration of the Quantum Suicide experiment. At each moment of the playthrough there's a lot of different things Mario could have done, and almost all of them lead to horrible death. The anthropic principle, in the form of the emulator's save/restore feature, postselects for the possibilities where Mario actually survives and ensures that although a lot of possible paths have to get discarded, the camera remains fixed on the one path where after one minute and fifty-six seconds some observer still exists.
To create the many-worlds video, the author hacked together a custom version of the SNES9X emulator. The application, which you can download in source or binary form, allows you to record the hundreds retry attempts you make through a level. It then compiles all of the attempts into a single Quicktime video that represents all of Mario's potential histories.
Super Mario World vs. the Many-Worlds Interpretation of Quantum Physics
Previously: Cruel Super Mario World hack
Posted by Jason Striegel |
Aug 11, 2008 10:06 PM
Retro Gaming, Science |
Permalink
| Comments (2)
| TrackBack
| Digg It
| Tag w/del.icio.us
HOWTO fly in the US without a wallet

One week ago, Sherri Davidoff dropped her wallet into an envelope and shipped it out. Then she boarded a plane:
After about a half hour, I got up to the JetBlue counter. I handed my boarding pass to the woman behind the counter and explained, "I don't have my wallet. Do you think I'll make it on the plane?""Oh," she said. "You'll make it. But go to the gate right away, because now they have to make a phone call."
"A phone call?"
"They call someone in Washington, I think."
Flying Without a Wallet
Posted by Brian Jepson |
Aug 11, 2008 06:40 AM
Government, Security |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 10, 2008
Run homebrew games on the PSP Slim

Gizmodo has a detailed walkthrough that guides you through the process of getting homebrew apps running on the PSP Slim (or any PSP, really). They skip the whole step of enabling service mode on your battery, since there are some cheap service mode batteries available for $25 that will save you the effort.
When you've completed the walkthrough, you'll have the latest hacked firmware installed which will allow you to run homebrew apps designed for the PSP, as well as any old PS1 games that you own and care to rip.
How To Hack Your PSP Slim For Homebrew Apps
Posted by Jason Striegel |
Aug 10, 2008 09:51 PM
PSP, Retro Gaming |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 9, 2008
Edit binary files in Vi

If you've ever wanted to examine or edit a binary file in your favorite text editor, there's an easy way to simulate a vi hex mode. To do this, you just filter the file's contents through the xxd hex dump utility, a trick that can be accomplished right within the vi/vim interface.
To convert a file to hex dump representation, just load your file in vi and type the following:
:%!xxd
This sends the entire contents of the opened document to xxd and loads in the result. At this point, you can view or edit any of the hex data. The ASCII representation is listed to the right, though editing this region will not affect the hex portion of the file.
When you are done, you'll want to convert things back into their binary format before saving. To do this, you run things through xxd again, but this time with the -r option:
:%!xxd -r
Your file should be returned to illegible gibberish, which you can save back out with :wq.
A funny thing I just noticed: OS X binaries all start with the same 4 bytes which, in hex, spell out the phrase "cafe babe". This is just a magic number used to identify the file as an OS X binary, but it's hard not to ascribe some deeper meaning. ;)
Posted by Jason Striegel |
Aug 9, 2008 10:00 PM
Linux, Mac |
Permalink
| Comments (5)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 8, 2008
Dell Inspiron 1525 HackBook Pro

Richard from EspressoReport put together a thorough tutorial that will get you up and running with OS X Leopard on a Dell Inspiron. Arguably, it's not the most sexy hardware, but at the $650 list price with dual core performance and the natively supported graphics chip (same as the MacBook's), it's not a shabby alternative to running OS X on Apple hardware.
Under the hood boasts a little bit older processor technology with a 533MHz FSB -- Intel Pentium Dual Core. This is very similar to the new Celeron Dual Cores but don't let it confuse you with the Pentium D -- this CPU is actually rather nice. Although using the Pentium name, the Pentium Dual Core is based on the Core technology you're already familar with on your Core Duo and Core2 Duo Macs. While the battery doesn't last quite as long as a similar Core2 Duo (Centrino), this 1.87GHz packs a punch and unlike all you other dual core users, I don't have to boot with cpus=1 -- that's right! This HackBook Pro is using both cores and it's putting out some power with Mac OS X.
Of course, you'll have to wrangle with the ethics of installing OS X on hardware that Apple doesn't wish you to. Perhaps the thought of ridding an innocent laptop of Vista will provide you with some solace.
Dell Inspiron 1525 HackBook Pro Tutorial
Posted by Jason Striegel |
Aug 8, 2008 09:39 PM
Mac, PCs |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 7, 2008
Ken Schwaber on Scrum
Scrum is a collection of tools for agile software development and project management. It helps to focus small software development teams into delivering a complete, tested, and quality product by breaking the development into small iterative chunks with a concrete output. Scrum doesn't necessarily help a team produce code faster, but it allows a team to find out very early in the process whether the development goals will be completed in the planned timeline.
Ken Schwaber, one of the developers of the Agile process and a major Scrum evangelist, presented Scrum to a group at Google. This video is a must watch for anyone involved in software development, whether you're a programmer or a project manager. In addition to introducing the management concept, he gives some insight into what makes a project fail (and how to know right away when it's going to), how to deliver on a tightened deadline without sacrificing quality (hint: half the features, not half baked), and why "core" functionality in a product tends to become unmanageable after 5 major development initiatives.
Google Tech Talks: Scrum et al.
Posted by Jason Striegel |
Aug 7, 2008 08:55 PM
Software Engineering |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 6, 2008
Memcached and high performance MySQL
Memcached is a distributed object caching system that was originally developed to improve the performance of LiveJournal and has subsequently been used as a scaling strategy for a number of high-load sites. It serves as a large, extremely fast hash table that can be spread across many servers and accessed simultaneously from multiple processes. It's designed to be used for almost any back-end caching need, and for high performance web applications, it's a great complement to a database like MySQL.
In a typical environment, a web developer might employ a combination of process level caching and the built-in MySQL query caching to eke out that extra bit of performance from an application. The problem is that in-process caching is limited to the web process running on a single server. In a load-balanced configuration, each server is maintaining its own cache, limiting the efficiency and available size of the cache. Similarly, MySQL's query cache is limited to the server that the MySQL process is running on. The query cache is also limited in that it can only cache row results. With memcached you can set up a number cache servers which can store any type of serialized object and this data can be shared by all of the loadbalanced web servers. Cool, no?
To set up a memcached server, you simple download the daemon and run it with a few parameters. From the memcached web site:
First, you start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you'll likely use:
# ./memcached -d -m 2048 -l 10.0.0.40 -p 11211This starts memcached up as a daemon, using 2GB of memory, and listening on IP 10.0.0.40, port 11211. Because a 32-bit process can only address 4GB of virtual memory (usually significantly less, depending on your operating system), if you have a 32-bit server with 4-64GB of memory using PAE you can just run multiple processes on the machine, each using 2 or 3GB of memory.
It's about as simple as it gets. There's no real configuration. No authentication. It's just a gigantor hash table. Obviously, you'd set this up on a private, non-addressable network. From there, the work of querying and updating the cache is completely up to the application designer. You are afforded the basic functions of set, get, and delete. Here's a simple example in PHP:
$memcache = new Memcache; $memcache->addServer('10.0.0.40', 11211); $memcache->addServer('10.0.0.41', 11211);$value= "Data to cache";
$memcache->set('thekey', $value, 60);
echo "Caching for 60 seconds: $value <br>\n";$retrieved = $memcache->get('thekey');
echo "Retrieved: $retrieved <br>\n";
The PHP library takes care of the dirty work of serializing any value you pass to the cache, so you can send and retrieve arrays or even complete data objects.
In your application's data layer, instead of immediately hitting the database, you can now query memcached first. If the item is found, there's no need to hit the database and assemble the data object. If the key is not found, you select the relevant data from the database and store the derived object in the cache. Similarly, you update the cache whenever your data object is altered and updated in the database. Assuming your API is structured well, only a few edits need to be made to dramatically alter the scalability and performance of your application.
I've linked to a few resources below where you can find more information on using memcached in your application. In addition to the documentation on the memcached web site, Todd Hoff has compiled a list of articles on memcached and summarized several memcached performance techniques. It's a pretty versatile tool. For those of you who've used memcached, give us a holler in the comments and share your tips and tricks.
Memcached
Strategies for Using Memcached and MySQL Better Together
Memcached and MySQL tutorial (PDF)
Posted by Jason Striegel |
Aug 6, 2008 10:37 PM
Data, Linux, Linux Server, MySQL, Software Engineering |
Permalink
| Comments (1)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 5, 2008
iPhone SDK tutorial - simple RSS reader
The Apple Blog recently posted a simple SDK tutorial for the iPhone that walks you through the steps for creating a little RSS reader. It's pretty cool in that it's one step above a Hello World app - it performs a real world function, but doesn't get too bogged down in features and details that would detract from its usefulness as a beginner howto.
When you're done with the howto, you'll know how to create an Objective-C iPhone project in Xcode, use the NSXMLParser class, and properly allocate and deallocate memory at runtime.
iPhone SDK Tutorial: Build a Simple RSS reader
Official iPhone SDK
Posted by Jason Striegel |
Aug 5, 2008 10:10 PM
iPhone |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
August 4, 2008
Shield your files with Reed-Solomon codes
Thanassis Tsiodras wrote in about a utility for adding additional error correction redundancy to your backup data:
The way storage quality has been nose-diving in the last years, you'll inevitably end up losing data because of bad sectors. Backing up, using RAID and version control repositories are some of the methods used to cope ; here's another that can help prevent data loss from bad sectors. It is a software-only method, and it has saved me from a lot of grief.
The technique uses Reed-Solomon coding to add additional parity bytes to your data. If you suffer partial damage to the storage media, these files can still be recoverable.
Storage media are of course block devices, that work or fail on 512-byte sector boundaries (for hard disks and floppies, at least - in CDs and DVDs the sector size is 2048 bytes). This is why the shielded stream must be interleaved every N bytes (that is, the encoded bytes must be placed in the shielded file at offsets 1,N,2N,...,2,2+N,etc): In this way, 512 shielded blocks pass through each sector (for 512 byte sectors), and if a sector becomes defective, only one byte is lost in each of the shielded 255-byte blocks that pass through this sector. The algorithm can handle 16 of those errors, so data will only be lost if sector i, sector i+N, sector i+2N, ... up to sector i+15N are lost! Taking into account the fact that sector errors are local events (in terms of storage space), chances are quite high that the file will be completely recovered, even if a large number of sectors (in this implementation: up to 127 consecutive ones) are lost.
The application works similar to any other command line archiving utility, so you can tar your files as normal and then send them to the freeze.sh script. Running melt.sh on the archive will return your original data, even if there was a reasonable amount of corruption to the file. Thanks, Thanassis!
Hardening your files with Reed-Solomon codes
Posted by Jason Striegel |
Aug 4, 2008 10:04 PM
Data, Linux |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
Photos of the Large Hadron Collider

View of the CMS (Compact Muon Solenoid) experiment Tracker Outer Barrel (TOB) in the cleaning room. The CMS is one of two general-purpose LHC experiments designed to explore the physics of the Terascale, the energy region where physicists believe they will find answers to the central questions at the heart of 21st-century particle physics. (Maximilien Brice, © CERN)
The following link contains a number of high-res photographs from CERN of the Large Hadron Collider. It's set to begin testing this month, and I must say it's about the most beautiful thing I've ever seen.
Large Hadron Collider nearly ready
Posted by Jason Striegel |
Aug 4, 2008 09:50 PM
Science |
Permalink
| Comments (0)
| TrackBack
| Digg It
| Tag w/del.icio.us
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- AppleTV
- Astronomy
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Design
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- OpenOffice
- Outdoor
- Parenting
- PCs
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Security
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
Recent Posts
- Beagle Board - ultra tiny, 2-Watt Linux system
- Olympic proxy - how to watch location restricted content
- Use iPhone version of Google Reader on your Mac
- Free airport WiFi
- iPhone screen capture
- Wii DVD player
- Korg Kaossilator 4-bar loop hack
- HOWTO - Protect GMail from session snatching
- 10 Google Apps Tips
- Super Mario World and quantum physics
www.flickr.com
|






Recent comments