Amazon's CloudFront brought CDN to the casual coder about five years ago. When Amazon announced CloudFront it had much of the same basic functionality as Akamai. But, the problem with CloudFront was many features were only accessible through APIs, not the AWS dashboard (management console). One of the key features missing from the dashboard was the ability to invalidate an object in the CDN. For me, this was a showstopper.
When caching an object (file) on an edge server, the CloudFront default setting stores it for 24 hours. To clear out a file before it expires requires an API call to invalidate it and fetch a new copy from the source. This setting was not originally available to the casual CloudFront user via the AWS dashboard. The API functionality was there, but, unlike Akamai's dashboard, it required a coder to put it in place.
I recently began using CloudFront, again. I'm happy to see the AWS dashboard can now invalidate objects with a simple click. Or, even better, the invalidation of a subset of objects is possible by specifying paths or patterns.
AWS just keeps getting better while dropping their prices. What could be better?
Friday, February 28, 2014
Thursday, February 27, 2014
Taking Inspiration from Others
Everyone wants to be an astronaut.
What a great job and let's not forget the first step to becoming an astronaut.
Monday, February 24, 2014
Communication Pipe
When I was a 19 year-old Marine I listened to a captain talk about communications and military operations. He told us stories about his part during the invasion of Grenada and his time in Beirut. In the 1980s, very few Marines had seen combat, so his thoughts carried a lot of weight.
The captain had some insightful experiences. One point he made was about, what he called, the communications pipe (we call it bandwidth, nowadays). As a communications pipe increases, more stuff gets added. The problem is that we always fill it to capacity. The upside is as bandwidth increases, the older technologies, like text chat, can shine during a crisis. His point resonated with me on 9/11 when I couldn't reach my boss and fellow Apple coworkers in NYC via phone or e-mail. But, AIM, being such a low bandwidth channel, worked without a hitch.
The captain had some insightful experiences. One point he made was about, what he called, the communications pipe (we call it bandwidth, nowadays). As a communications pipe increases, more stuff gets added. The problem is that we always fill it to capacity. The upside is as bandwidth increases, the older technologies, like text chat, can shine during a crisis. His point resonated with me on 9/11 when I couldn't reach my boss and fellow Apple coworkers in NYC via phone or e-mail. But, AIM, being such a low bandwidth channel, worked without a hitch.
Tuesday, February 18, 2014
Cache is King in Safari
One trick to speeding up an application is caching. Rather than fetching data from a database or over the network each time you need it, it's better to retrieve the data as soon as possible and hold on to it as long as possible --- and no longer. The only thing worse than slow or no data is bad data.
Last week, I was monitoring a web server log for a URL shortener when I noticed a neat trick Safari does. Rather than waiting for me to hit enter after I typed in a URL, Safari automatically loaded the webpage during the autocomplete phase. It's a brilliantly simple solution. After all, why not start loading a webpage before I ask for it? Actively loading data before it's needed is known as warming up the cache. It's smart since it makes for the best possible user experience (BPUX).
There's nothing like proper optimization, done in small steps, when needed. On the other side of the coin is premature optimization which is the bane of any software engineer's existence. (Rules to Code By)
Another Safari optimization trick I read about but haven't confirmed is that, after loading a web page, Safari will prefetch each link's IP address for faster loading when a user clicks on it since the DNS lookup has already been done.
Anything to speed up my Internet experience is OK by me.
Autocomplete prefetching over the network before I hit enter. |
There's nothing like proper optimization, done in small steps, when needed. On the other side of the coin is premature optimization which is the bane of any software engineer's existence. (Rules to Code By)
Another Safari optimization trick I read about but haven't confirmed is that, after loading a web page, Safari will prefetch each link's IP address for faster loading when a user clicks on it since the DNS lookup has already been done.
Anything to speed up my Internet experience is OK by me.
Wednesday, February 5, 2014
Work Hard, Be Productive
I've worked in some fast pace environments, from the Marines to startups. The one thing I've noticed is there's some confusion between working hard, looking busy, getting excited and actually being productive and making money.
Many people are drawn to day trading because it's exciting. Big mistake. If you're looking for a rush then ride a roller coaster or go to Vegas. If you're going to war or building a startup then work smart and be productive. In the Marines, we used to say, "It's easy to be hard. It's hard to be smart."
The key to good leadership is to give your people enough direction by prioritizing tasks (with deadlines) and then let them go. The antithesis is to interrupt them. I once worked for a boss who was horrible at communicating in a timely fashion. Nearly all phone calls and meetings had no agenda or succinct purpose. Non-pressing deadlines were set and then changed without clear reason. Actually, the real reason is he was disorganized and he had poor time management skills. He never wrote down any of his tasks that I saw and he couldn't prioritize tasks or timelines. Ideas would pop in his head and he'd spit them out, regardless of the urgency. It was interruption after interruption.
If you think making money is directly proportional to how smart you are or hard you work then you need to think twice. I worked way harder in the Marine Corps than I did after I left Apple when I just sat back and watched the price of my Apple stock, originally purchased at less than $10/share, go to $500–$700/share. Guess where I made more money: USMC or AAPL?
So, before interrupting a colleague, ask yourself if your interruption is urgent and important enough to justify it or can it wait until the recipient is better prepared to receive the information? Another test, before interrupting, is to ask yourself what will happen if you wait to pass the info?
Need more tips? See Time Management in the 21st Century.
Many people are drawn to day trading because it's exciting. Big mistake. If you're looking for a rush then ride a roller coaster or go to Vegas. If you're going to war or building a startup then work smart and be productive. In the Marines, we used to say, "It's easy to be hard. It's hard to be smart."
The key to good leadership is to give your people enough direction by prioritizing tasks (with deadlines) and then let them go. The antithesis is to interrupt them. I once worked for a boss who was horrible at communicating in a timely fashion. Nearly all phone calls and meetings had no agenda or succinct purpose. Non-pressing deadlines were set and then changed without clear reason. Actually, the real reason is he was disorganized and he had poor time management skills. He never wrote down any of his tasks that I saw and he couldn't prioritize tasks or timelines. Ideas would pop in his head and he'd spit them out, regardless of the urgency. It was interruption after interruption.
Interruptions Be Gone
One thing to realize is that every call, text, IM and e-mail is an interruption. Each interruption is going to knock a person out of their productivity zone so it's important to weigh the interruption with the importance and urgency of the information being passed along. Many people constantly interrupt coworkers and subordinates because they're worried about forgetting their own assignments. Instead, they should simply write down everything they need to do (both what they need to do and what they need others to do) and then sync up with their coworkers during planned meetings rather than unplanned interruptions.If you think making money is directly proportional to how smart you are or hard you work then you need to think twice. I worked way harder in the Marine Corps than I did after I left Apple when I just sat back and watched the price of my Apple stock, originally purchased at less than $10/share, go to $500–$700/share. Guess where I made more money: USMC or AAPL?
So, before interrupting a colleague, ask yourself if your interruption is urgent and important enough to justify it or can it wait until the recipient is better prepared to receive the information? Another test, before interrupting, is to ask yourself what will happen if you wait to pass the info?
Need more tips? See Time Management in the 21st Century.
Webification with Web-ins™
Webification is the process of converting content so it can be viewed on the Web. It's a big deal to simplify a technical process or protocol by overlaying a human readable Web interface. Hotmail did it for SMTP/POP (e-mail), Blogger did it for FTP, RSS did it for XML, and then Twitter took it one step further and did it for RSS.
A friend, who runs a green website, created what she calls web-ins™. What she's done, without realizing it, is webified the XML sitemap.
Sitemaps help search engines understand the hierarchical structure of websites. When I google "CNN" I see that the search engine returns more than a simple summary and link to the cnn.com homepage. With the help of CNN's sitemap.xml the search engine deep links me directly to the content I'm looking for rather than me needing to first visit the CNN homepage followed by clicking through to the content.
Each web-in™ is manually created depending on the destination website. Different areas of a web-in™ link to different parts of a website:
The next step in standardizing web-ins™ is to have webmasters create their own for third parties to display on their websites in place of simple links to home pages. Webmasters could provide web-in™in sizes that conform to IAB guidelines as either static HTML or, even better, as a Javascript that implements an iframe whose content would be maintained by the content provider instead of the third party.
There's an elegant beauty in simplicity.
Google's search results for CNN. |
Sitemaps help search engines understand the hierarchical structure of websites. When I google "CNN" I see that the search engine returns more than a simple summary and link to the cnn.com homepage. With the help of CNN's sitemap.xml the search engine deep links me directly to the content I'm looking for rather than me needing to first visit the CNN homepage followed by clicking through to the content.
Each web-in™ is manually created depending on the destination website. Different areas of a web-in™ link to different parts of a website:
Sample live web-in™ |
KISS
Web-ins™ are nothing more than HTML area and map tags. It's such a simple solution it could easily go unnoticed. But, then again, Twitter is nothing more than 140 characters of text without markup.The next step in standardizing web-ins™ is to have webmasters create their own for third parties to display on their websites in place of simple links to home pages. Webmasters could provide web-in™in sizes that conform to IAB guidelines as either static HTML or, even better, as a Javascript that implements an iframe whose content would be maintained by the content provider instead of the third party.
There's an elegant beauty in simplicity.