October 8, 2013
T-minus 36 Hours: The beginning
“Dude, whatcha gonna build?”
“No clue, but it’ll be awesome.”
This was the first conversation I heard upon arriving at the brainy basement stronghold of Ann Arbor entrepreneurship, TechArb, on the Friday afternoon before MHacks officially kicked off. A group of Penn State engineering students had just shuffled in off their seven-hour bus ride, and their tone mirrored the room’s chaotic anticipation of what lay ahead.
As 1,200+ hackers from 100+ universities collected their access bracelets and sponsor swag upon checking in at the Crisler Center, the word “epic” bombarded all senses into agreement. This was going to be BIG (house) — Michigan Stadium, a.k.a. “The Big House,” is the football stadium for the University of Michigan in Ann Arbor and has a capacity of 82,000; the Crisler Center’s been home to countless Big Ten sports championships.
Per standard hackathon operating procedure on a grand scale, organizers pumped up the crowd and sponsors demoed their APIs on stadium monitors in hopes of seeing some fresh new use cases during the expo on Sunday. They wouldn’t be disappointed.
As soon as demos finished, base camps formed. Hacker refugees were adopted based on skill set (or eagerness), and hives began to buzz about what they’d create in the next 36 hours.
T-minus 24 Hours: The Dreaded Pivot
No matter how much you plan ahead, there’s simply never enough power plugs or wifi bandwidth at a hackathon. Friday night blearily bled into Saturday morning as networking contractors patched up the inundated UM network.
After a surge of sunrise productivity — lit by an inspiring view looking down on the nation’s largest football stadium empty on a crisp Fall morning — and an afternoon of inspiring tech talks, some hackers faced the grim reality that their projects wouldn’t be as simple or useful as they’d hoped. It was time to “pivot.”
Luckily for them, the university had granted all MHacks participants full run of the football field for a morning jaunt. Footballs, frisbees, UFOs, and freewheeling product discussions flew around with abandon in a welcome break from keyboards. Lack of showers aside, it was a blast. And a privilege that would again be granted in the evening for an even more necessary twilight field takeover (complete with t-shirt cannons!).
T-minus 12 Hours: The Long Haul
Saturday night. The long haul. Running on nothing but Red Bull fumes and hope, it becomes apparent that some projects simply won’t come together for demos the next morning. Most teams, however, get their first glimmers of success. But whether it’ll all come together in the end is to be seen. All the while, a dream team of developer evangelists scrambled through the night to aid all those in need of help using their tools, and recruiters chatted up the best and brightest burgeoning software makers in the country.
T-Minus 2 Hours: The Homestretch
Photo credit: Nicole Moore for University of Michigan
Sunday morning’s spectacle of anxiety and exhaustion defies adequate description. Frankly, it looked (and smelled) like the aftermath of the smartest fraternity party bender in history. Delirious coders squinted at their screens and made final tweaks to connected hardware. Then it was time to finish their submissions on ChallengePost, making sure that all teammates were included and boxes were checked for all appropriate sponsor prizes. Time’s up.
T-Minus 0: An Epic Close
Back in the basketball arena, 247 teams plugged into impressively laid out routers and power plugs to show off their creations. Sponsors and judges made their rounds, thrilling at the ingenuity and enthusiasm on display. Peers marveled at each other’s work, and shared war stories on what it took to accomplish so much in short order. The demo fair was truly remarkable to behold. It’s something any hackathon skeptic needs to see to understand what events like MHacks are all about.
Once judges had gone about the difficult task of identifying their top ten and sponsors picked their winners, it was back to the bleachers for demos and award announcements. The organizers expressed sincere appreciation for everyone’s help making MHacks exceed all expectations.
Sponsors gave out 20 prizes amidst an impressive slew of live demos — there were prizes for most technically impressive, best use of select APIs/platforms/services, a Thiel Fellowship Prize for the best hack by a team where all members are under 20, and more.
The top three prizes went to Green Can, a hardware hack that auto-sorts recyclables from trash; Save My Glass, which projects a car’s dashboard info through Google Glass and vibrates in your ear if you fall asleep at the wheel; and Tabbr, a search engine for tabs.
Winners congratulated each other while sponsors, judges, and hackers traded contact information to continue their collaborations. It was all suddenly over, as buses and airports filled with students worn out and invigorated from the experience.
In 36 hours, 1,200+ engineering talent learned, collaborated, and created brilliant hacks. (They also sang “99 bottles of beer” in binary; played football; and made not one, but two Harlem Shake videos.) Most inspiring of all, they had fun while innovating their hearts out. Epic indeed.
More about MHacks:
MHacks: The Trailer [MHacks]
Recyclables sorter wins top prize at record-setting MHacks event [University Record]
Check out a ‘smart trashcan’ and other top inventions from MHacks Hackathon [mlive]
October 3, 2013
We’re taking a brief break from our regular programming (no pun intended) to bring a little something — well, $14 million to be exact — to New York City businesses that want high-speed fiber Internet: free fiber wiring! All you have to do is apply through the ConnectNYC Fiber Access program. (If you missed our previous post with details on how, catch up.)
For those of you who are just finding out about this, or are on the fence as to whether to apply, hear from Cover.
A startup based in NYC, Cover has created a handy mobile app that makes it super easy to pay a check when you’re out at a restaurant — you know, without any of that awkward finger-counting tip calculation, or the anti-fun check splitting among friends — without waiting. As founder Mark Egerman puts it, Cover “works with some of the best restaurants in the city to help create the future of hospitality.”
Within weeks of applying for the 2013 ConnectNYC program, Cover became the very first recipient of free fiber optic construction.
Egerman, the founder of Cover, shares why he felt compelled to apply: “We have both cable and DSL lines servicing our new office in Soho, but neither work reliably or sufficiently well. Inconsistent and slow internet speeds were affecting productivity and we had been wondering about alternatives. We had asked some friends at other companies about fiber but were uncertain about the build-out costs. When I saw the ConnectNYC Fiber Access program, it seemed like an obvious fit.”
Like most tech startups, Cover relies on constant connectivity for communication, development, hosting, and all-around productivity. So there was little doubt in Egerman’s mind that having reliable and consistent high-speed Internet access would improve Cover’s overall operations.
The best part? He didn’t even need to convince the landlord. “We were very fortunate that our landlord instantly saw the value in the program and supported it without reservation.”
NYC businesses: could you be next?
Applications for the free fiber wiring program are being reviewed on a first-come, first-served basis until December 12, 2013, or until the allocated constructions funds are exhausted — so apply early! And if you’re still reluctant to jump on this opportunity, consider a free 30-minute fiber consultation from Streeter Technologies to assess your company’s needs.
But seriously… it’s fast, it’s free, and it’s awesome. What are you waiting for?
ConnectNYC is part of a series of initiatives by New York City to expand wireless access and broadband connectivity in NYC.
September 23, 2013
Fall might usher in crisp weather in many parts of the globe, but it’s safe to say that things are heating up in the world of hackathons. Just take a look at the 450 hacks created at the epic PennApps and MHacks in September.
Want to get in on the action? Check out this weekend’s opportunities from east to west across the US, up north to our neighbors in Canada, and across the pond in the UK. Sign up soon, and have a blast coding with fellow software makers!
Sports tech: Los Angeles (September 28–29)
If you’re looking to connect with hundreds of the most talented innovators in the sports technology space, the On Deck Cup — an offshoot of the On Deck Sports and Technology Conference — is organizing a series of hackathon competitions nationwide (Boston & New York wrapped up in the past two weeks). Come and develop innovative new technologies focused on sports, and win prizes over $29,000.
Cross-platform & ed tech: New York, NY (September 27–28)
With a focus on building apps that are compatible with multiple devices, “The Internet of Things” Hackathon invites software makers to create apps that involve All-In-One PCs and mobile phones. This particular event will also have an educational bent, as high school students from GenTech will be on site to learn about development, share feedback on ed tech needs, and hack alongside teams. Prizes: $6,700 + a chance to win pitch spots at the National Accelerator Demo at CES in Las Vegas.
Social change: Philadelphia, PA (September 27–28)
Civic hackers, don’t miss Hack the Change, organized by the Penn Society for International Development (PennSID), in collaboration with Random Hacks of Kindness Philadelphia (RHoK). You’ll be encouraged to hack with NGOs, developers, and entrepreneurs to solve real world problems and make an immediate impact on the community at large. Prizes: $2,050.
Cloud computing: Cambridge, MA (September 28)
The Hopper Elasticsearch Hackathon is an all-day power hack where you get access to a huge cluster to create something awesome using Elasticsearch, a powerful open source search and analytics engine that makes data easy to explore. Prizes: 1-year subscription for SoftLayer ($12,000 value) and a seat in an Elasticsearch training course ($1,600 value).
Data & APIs galore: San Francisco, CA (September 28–29)
It’s all about data at Data + API Hackathon 2013, a hackathon at DataWeek + API World 2013, San Francisco’s largest data conference. We’re talking big data, social data, cloud data, API infrastructure, Hadoop, Twitter data and so much more! This is your chance to present your data app and business idea in front of a panel of venerable investors and technology experts. (Whew! We’ll stop saying the word data now.) Prizes: $11,000.
General hacking: Regina, Saskatchewan (September 28)
HackREGINA Fall 2013 is the 2013 Regina-based edition of HackDays, the one-day API programming hackathon events that take place across Canada. For one day, teams of 1–3 developers, designers, and analysts hack together awesome applications using local APIs. Compete for great prizes and glory!
Games: London, UK (September 28)
Join the Hackathon Queen and game developers for The Big Six – Casino Hackathon. Build Casino games in one day and invite your friends to the gameathon demo session and after party. Prizes: Two months free hot desking at Innovation Warehouse.
September 18, 2013
We all want our pages to load faster. Though the big picture of web performance is quite complex, payload size and location are two factors that can be minimized with a little effort. Here, we’ll look at how delivering static assets from a cookie-free domain via a content delivery network (CDN) can help reduce your latency.
Defining a cookie-free domain
Defining a CDN
A CDN delivers data from a nearby server, determined by geo-location, rather than making the full trip to your servers. When most of your users come from one place, this may not matter as much. But ChallengePost hosts local hackathons in countries around the world, like Way Out West Hack Battle in Sweden and Random Hacks of Kindness in South Africa. We also host online challenges with international appeal, such as the Chart.js Personal Dashboard Challenge and the Tactrick Android DevCup, so providing our global audience with a solid user experience is important to us.
Here’s how we do it:
The basics: setting a cookie-free domain
Let’s set the cookie-free domain first. You have two alternatives: as a subdomain or as a different domain altogether. Your choice probably depends on your business needs, but all other things equal, there isn’t much difference between the two other than the setup.
To scope cookies to one subdomain (e.g. www.example.com), so you can host assets from another (such as `assets.example.com), here’s what you’ll want in config/initializers/session_store.rb:
You also need to let Rails know which domain your assets will be served from so helper tags will construct the correct URLs. In config/production.rb:
Next up is your DNS configuration. You’ll want to make sure you have a CNAME (Canonical Name) record that aliases your assets subdomain to your primary A record domain. So for our example, the label/name/alias is assets.example.com and the value is www.example.com.
B. Separate domain
To share cookies across all subdomains of your primary, your session store will declare your top-level domain as the scope and you’ll need to acquire a different domain for your assets, like assets-example.com.
In this case, you can add an A record for your assets domain that points to the same IP as your app server’s domain:
Now you have the ability to serve all assets on a cookie-free domain. When choosing where to set cookies in your app server, you’ll also want to consider how other cookie-setting services you rely on, such as Google Analytics, will be affected.
Next steps: setting up a CDN pull zone
At ChallengePost, we rely on the CDN provider MaxCDN, powered by the NetDNA CDN platform, to serve our static assets. Popular alternatives include Cloudflare and Amazon CloudFront. When setting up a CDN for the first time, the big question is “How do we put our content there?” It turns out you’ve got a few choices and it helps to understand two general strategies — push zones and pull zones — each with its own set of advantages and disadvantages.
In a push zone, developers are responsible for transferring content to the CDN directly. If you change assets and deploy regularly, you’ll want to automate this process to save a lot of hassle. With a pull zone, you simply deploy your assets to your own servers as usual and set up your CDN to fetch and cache the assets from your origin when requested. This approach is easier to set up, but results added latency for new assets.
At ChallengePost, we use pull zones. To set up a pull zone on MaxCDN, create an account and then follow the + Create Pull Zone link under the Zones tab. You’ll need to enter the origin URL, your primary domain, and, if desired, your custom CDN domain (such as assets.example.com or assets-example.com). Enable compression to have all your assets gzipped, another Yahoo-recommended best practice. Be sure to check out NetDNA’s article on creating a pull zone for detailed info.
Once you provision your pull zone, MaxCDN will create a CDN domain on your behalf, something like yourapp.netdna-cdn.com. You can choose to add a CNAME record pointing your own CDN domain to theirs or simply choose to use their domain directly.
That’s it! Of course, you’ll likely want to test your CDN setup before making the DNS changes, rather than hoping and praying that everything works. This is simple to do on the command line by issuing a HEAD request to a known asset on your server through the CDN host. This mimics the request behaviour of a real browser requesting the file after you made the DNS change.
If your setup is working, you would expect to see something like this:
Note the X-Cache header will indicate “MISS” the first two times the request is made because the CDN edge servers only cache files after they’ve been requested twice.
When you’re ready to make the switch live, set up your CNAME record:
Depending on your business or technical constraints, you may need to go a bit further.
Assets over SSL
If your app is hosted partially over SSL, you’ll need to account for this in your asset host configuration and in your CDN configuration to take advantage of the same benefits, while avoiding mixed content warnings. You can enable SSL hosting on MaxCDN (although using a custom domain on SSL comes at an additional cost), which will come with its own CDN host.
You’ll want to make your Rails app aware of the SSL endpoint by adding some logic to your asset host configuration in config/production.rb:
For a nice write-up on dealing with complexity in your asset host configuration, check out Code Climate’s blog post on Testing Code in a Rails Initializer.
Configuring the web server
You may also need to add a directive to your web server configuration that allows cross domain requests for your assets. This can be accomplished by adding the Access-Control-Allow-Origin header in your webserver configuration. Below is an nginx configuration snippet that could work for a Rails 3.2 app:
Here’s a checklist for improving delivery static assets from your Rails app:
- Set up a cookie-free domain
- Set up a CDN pull zone
- Configure your Rails asset host
- Update your DNS settings
- Host assets from your web server, not your Rails app
Take part in Speed Awareness Month and get it done today!
This post originally appeared on Speed Awareness Month.