Apple Sold 2 Million iPads In 59 Days

Apple has just announced that sales of its tablet computer iPad have now topped two million in less than 60 days since its launch on April 3. That’s a whole lot of iPads in under two months, and the company only started shipping units to customers in countries outside the United States last weekend.

The news comes almost a month after Apple announced that it had sold 1 million units.

As previously announced, the iPad will be available in nine more – but still unnamed – countries in July and additional countries later this year.

And they’re still clinging on to the ‘magic’ rhetoric, apparently:

“Customers around the world are experiencing the magic of iPad, and seem to be loving it as much as we do,” said Steve Jobs, Apple’s CEO. “We appreciate their patience, and are working hard to build enough iPads for everyone.”

Apple in a statement said developers have created over 5,000 new apps for iPad to date.

In a week, Jobs will be front and center at Apple’s Worldwide Developer’s Conference in San Francisco – the man’s keynote starts on Monday 7 June at 10 AM PST.

Information provided by CrunchBase


Are Questions The “Future Of Facebook”?

About a week ago, word started getting out that Facebook is beta testing a new “killer app” called Facebook Questions. For beta testers, the Questions feature appears in the left-hand column just below Events and Photos. It lets you ask and answer questions to and from your extended circle of friends.

A few days ago, Facebook opened up the private beta further and is now taking applications for anyone who wants to enter the beta. Facebook is taking its Questions product very seriously. “Help us build the future of Facebook,” reads the title of the page.

It puts the Questions product on par with Photos and Events.

As a beta tester, your job will be to ask great questions and provide great answers about your favorite topics. Economics? Skydiving? Relationships? Mexican Restaurants? It’s up to you. You’ll be the first person outside of Facebook to use this product. Your expert writing will be seen by tens of millions of people — including job recruiters. And we’ll bring our best beta testers out to California to tour Facebook headquarters and meet the team.

All you have to do to become a beta tester is submit three sample questions, such as

  • What are the main differences between Google Chrome and Internet Explorer?
  • What are women looking for in a relationship?
  • What methods has BP tried to clean up the oil spill?

In one fell swoop, Facebook is about to take on Yahoo Answers, Google (via recently acquired Aardvark), LinkedIn (notice the reference to job recruiters?), and Quora.  Q&A sites drive massive pageviews. It is an area Facebook can no longer ignore.  People already use Facebook informally to ask questions across their social network from time to time.  It is a type of status update, if you think about it.  The Questions feature will bucket all of these together, spread them across your friends and their friends, and make them searchable.

The advantage Facebook could have in the Q&A space is that to the extent that you find answers from your extended social network, questions can become the start of deeper conversations and spur new relationships. But breaking it out as a separate feature raises some new questions. Will every major type of status update now become its own feature on Facebook (like Photo and Event updates do)? And, if so, what’s next?

Information provided by CrunchBase


We Love You Too: 250+ TechCrunch Anniversary Meetups And Counting

On June 11, it will be exactly five years since Michael Arrington hit the ‘Publish’ button and introduced the Interwebz to the very first TechCrunch post (which was a brief profile of blog search engine Technorati, which Mike apparently labeled a real-time search engine at the time – what’s old is new again, right?).

We want to celebrate our fifth anniversary with as many people as we can, across the globe. So we are using the new Meetup Everywhere platform that Scott Heiferman announced on stage at TechCrunch Disrupt last week to organize TechCrunch Meetups on June 11 all around the world.

We’re not only celebrating TechCrunch, but the last five years of the Web in general. A lot has happened since June 2005, but the wheel keeps on turning, faster than ever. Sometimes, it’s good to take a breather, look back and celebrate, and then move on.

Either way, we were pleasantly surprised to see how many people jumped on this. On May 28, we counted nearly 150 meetups planned in places like New York City, San Francisco, London, Hyderabad, Bangalore, Seoul, Tel Aviv, Jakarta and Sophia.

Just three days later, another 100 were organized by readers and fans all over the world, so we’re at 252 and counting. We see meetups are being organized from ad Dasma’, Kuwait to Rio De Janeiro, Brazil and St. Petersburg, Russia. Amazing, and humbling.

Yes, we realize you probably just needed yet another excuse to party, but we’re all in awe that you’re willing to do under our banner anyway.

Have fun on our fifth birthday bash for us, will you? And don’t forget to send in pictures.


Stanford Graduates Release Pulse, A Must-Have News App For The iPad

Akshay Kothari and Ankit Gupta, two Stanford grads who signed up for the Launch Pad class at the University’s Institute of Design (aka d.school), could have hardly chosen a better path to try their hands at startup life. The pair has gone from idea to a (very cool) digital news app for the iPad in just 5 weeks, and they’re just getting started.

The application, called Pulse, is essentially a visually attractive RSS-based news aggregator. On sale for $3.99 (iTunes link), the app is aimed to please both hardcore RSS reader users and people who are willing to pay top dollars for single publication apps.

Pulse’s home screen renders stories from multiple sources on a dynamic mosaic interface. Swipe up and down to see headlines from various sources, and right and left to browse stories from a particular source (thanks for featuring TechCrunch in the demo video, guys).

Tapping on a story takes you to a text view of the article, and lets you switch to a Web view simply by toggling the appropriate button. You can also easily share articles with your friends on Facebook and Twitter or by e-mailing a link to the article. As you can tell from the video embedded below, Pulse works well in both Portrait and Landscape view.

We should note that streaming video in-app is not yet supported due to stability issues, but the makers promise that the next update will come with support for embedded video playing.

Big plus: Pulse can integrate feeds from your Google Reader.

Big minus: you can only add 20 RSS feeds to the reader (up from 10 at launch).

Nevertheless, a must-have (or at the very least, a must-try) app if you have an iPad.

Do not despair if you do not: Kothari and Gupta will expand Pulse to other platforms ‘very soon’, starting with the iPhone.

Information provided by CrunchBase


The Disappearing #flotilla Hashtag May Have A Simple Explanation


As we know from breaking news right now over 10 people have died after Israeli commandos boarded a convoy of ships carrying aid to Gaza, sparking an international controvery. But we’re not going to get into the politics of that situation. What we’re interested in is what happened on Twitter today. Because although the convoy has been dubbed a “flotilla” by Twitter users and a large number of people were using the #flotilla hashtag, this disappeared from after trending briefly. The only remaining related trend topic was Israil, the Turkish word for Israel.

As a result, a large number of of people are calling out Twitter for “censoring” the #flotilla hashtag.

In addition #flotilla was not appearing on Twitter’s trending list despite the fact that it is pretty prominent on Google trends. It’s causing a huge wave of controversy right now.

So what can be found out about what happened to the #flotilla hashtag?


Is Print Media Doomed Worldwide or Just In The US?

As I walked in the headquarters of the Jawa Pos—the flagship newspaper of one of South East Asia’s largest print media empires—I was wondering just how screwed my profession is; globally I mean.

Is the death of print a world-wide certainty or merely an American reality? After all a lot of “old economy” businesses are thriving in emerging markets thanks to Greenfield advantages and rising middle class economics. Spoiler alert: I walked out a few hours later not hugely convinced print is the future but willing to believe that in some places the death-blow of digital might be limited to a mere-crippling. How’s that for bullish?

Language difference and a preponderance of statues aside, the Jawa Pos felt like any other newsroom of a large daily. It was almost 9 pm and there was a still a buzzing, frenzied office full of people —some of whom had been there since 5 am, and some of whom would be there until midnight. I sat down with the chief editor, Leak Kustiya (below, second from right), and his deputy at a large, circular table in the middle of the newsroom—the hub of all the department spokes and the spot where the editors make their daily decisions. It could have been a scene out of an Indonesian version of “All the President’s Men.”

But when I asked how the paper was responding to the digital age, I was disappointed in the answer: We’re protecting print revenues as long as we can. Wow, I thought. Have you learned nothing from the West? Web revenues will never equal print revenues, per ad. But guess what? Future competitors don’t care. They are happy to build a business off of ads that are 20% of what you charge, because they are building a digital business without printing presses from the ground up. It’s New York Times v. TechCrunch all over again.

Or is it? Every local paper claims superior coverage of local news will save it, but that takes having a young, aggressive staff of reporters—and most of those people were the first to leave when newspapers started their inevitable decline in revenues and death in morale by a million small rounds of layoffs.  I came away from the Jawa Pos thinking they might have a shot largely because of one factor: Hiring practices. In fact, the US media—including blogs like TechCrunch—could learn something from them. The company’s network of more than 150 publications and television stations is designed to avoid the exact problem that plagues old-school media: An overpaid preponderance of senior staff that doesn’t do much.

The Jawa Pos will only hire someone if they are under 25 and you must retire when you hit 50—no matter what your seniority. And those slots are coveted positions. Some 400 people apply twice a year, and 100 get interviews. Fifteen are selected, and they enter a rigorous six month training period where they learn all aspects of the reporting trade and editors get plenty of time to see how they can work a beat, generate story ideas, break news and work under pressure. Typically only five get a permanent slot. The logic here, simply put, is that news is a young person’s business. It’s like American Idol for journalists. In some senses, it’s precisely the opposite of the unions most US newsrooms have.

With 15-years experience mostly in old media, I’ve personally enjoyed the spoils of seniority and years spent paying my dues, although not nearly as much as someone who has been in the business 30 or 40 years. And guess what? There are just some things I did for a story in my youth that come harder to me now.

Dinners three-to-four nights a week, endless 6 a.m. breakfasts with sources, trolling the halls at the largest trade show conferences for a quote or a tip these are all things that give an advantage to younger, hungrier reporters without spouses or families the same way a 20-something entrepreneur has energy and a fresh look on an industry that a grey-haired veteran can’t match. Hell, after spending 40-weeks on planes, lost on back-alley streets and dining on mini-bar Pringles around the world, I’m not even sure I’d sign up to write my current book-in-progress again.

Does experience and seniority have advantages in the work place? Of course. That’s why the Jawa Pos lets you work there until you are fifty.

Given how many other countries err on the side of being too protective of workers, the somewhat draconian, Logan’s Run approach was a surprise to me. But the Jawa Pos’s policy ensures that only the best reporters are allowed on staff because getting a job isn’t a simple as showing some clips or faking an interview and it ensures that despite clinging to a graying medium of print, the staff itself is always staying young, and hence, in touch with younger readers. It’ll be interesting to watch and see if that’s enough to beat a broader market certainty that print is dead and digital is the future. And if not? At the least the task of righting the ship will be left to younger blood.

It may sound cruel, but I’d argue it’s not nearly as cruel as daily papers going out of business en masse and taking good reporters and editors with them. Maybe the Jawa Pos should look more closely at the mistakes our profession made ten years ago, but this is one big fail safe against complacency already in place.


Wireless Analyst Predicts Mobile LBS Revenues To Reach €420M In Europe By 2015

According to a new research report from Sweden-based wireless analyst Berg Insight, mobile location-based service revenues in Europe are forecasted to grow from €220 million in 2009 to €420 million in 2015.

Berg Insight adds that local search, navigation services and social networking are poised to become the top applications in terms of number of users, which is sort of a give-away as those categories have already proven to be the most popular and fastest-growing among smartphone users worldwide.

Berg Insight, which offers business intelligence to the telecom industry and provides analysis to companies such as AT&T, Microsoft, France Telecom, IBM, KPN Mobile, NTT Docomo, Nokia, Telefonica O2, Vodafone Group, Alcatel and Motorola, estimates that one third of all mobile subscribers in Europe will use “some kind of location-enhanced application” on a regular basis by 2015.


Friends Again: Pakistan Court Lifts Ban On Facebook

On Monday, a Pakistani court ordered authorities to restore access to social networking site Facebook after company officials reportedly apologized for a page deemed offensive to Muslims and removed its contents. The Lahore High Court imposed the nationwide ban almost two weeks ago amid outrage over the page, which encouraged users to post drawings of Muhammad, as many Muslims consider depictions of Islam’s Prophet to be blasphemous.

Earlier today, Justice Ejaz Ahmed Chaudhry of the Lahore High Court reversed the 19 May order to the Pakistani authorities to block the site.

“Restore Facebook. We don’t want to block access to information,” Justice Chaudhry told the court. He also requested the government to develop a system to find out how countries like Saudi Arabia were blocking access to “blasphemous” content on the internet.

According to Bloomberg / BusinessWeek, the ban was lifted after the court was told the company had exchanges with Richard Holbrooke, U.S. special envoy for Afghanistan and Pakistan. Chaudhry Zulfiqar, the lawyer who asked the court to block the popular social networking site on May 19, told a Bloomberg reporter by telephone:

“The counsel for the state provided documents showing correspondence between the Facebook management and Richard Holbrooke. According to those documents, Facebook assured the court no blasphemous material will be available to users in Pakistan.”

Pakistani authorities had also blocked access to YouTube for containing “un-Islamic content”, but this ban was at least partially lifted last week.

Bangladesh also decided to block Facebook this weekend but said it would restore access to the site if the offensive material was removed.

More coverage on Reuters, Al Jazeera English, AFP and BBC.

Information provided by CrunchBase


Interview with Chris Gross, Plus SourceMate License Giveaway!

SourceMate is a new plugin for FlashBuilder which promises to add a lot of “missing” features some of us of taken for granted in other IDEs.

Read on to hear SourceMate Architect Chris Gross answer some questions about the product, plus find out how you can win a free license!

sm_title

QSourceMate is a new Plugin for Flash Builder which adds some much needed refactoring, code generation, and automation to the IDE. How did you guys come up with the product, who’s on the team and what is the goal?

There are 3 of us on the SourceMate team including myself as the primary architect. We developed SourceMate pretty quickly after founding ElementRiver. Being experienced Java developers, we’ve become used to many of the features found in the popular Java IDEs. Things like code templates and snippets, but most of all the huge time-saving refactoring features. We wanted those features for ourselves but we also understood that other Flex and ActionScript developers wanted them too. With our significant Eclipse expertise to back us up, we jumped right in and started developing SourceMate.


QOut of all of the amazing features, what would you say is the one you are most proud of?

Good question. The code templates seem to be very popular. I use the code generation features (like Generate Getters/Setters) daily. The features around metadata tags, which are becoming more and more important in today’s Flex frameworks, are significant.

Generate-Getters-and-Setters%25202

But I’d have to say the refactoring features like Extract Interface are really my favorites. Using Extract Interface just once can save you hours of time. Do you have a few methods in a class that you’d like to pull out into a separate interface? Click a few buttons and SourceMate will do it for you. It will create the interface class, add the implements clause to the original class, and most importantly go through your entire workspace to see if it can change variables referring to the class’s type to the new interface type.

Extract-Method

QHave you been working with Adobe on this project or is it something you have undertaken on your own?

We’ve spoken with Adobe and they’re supportive but SourceMate is solely an ElementRiver creation.

www.elementriver

QLet’s talk about the ASDoc and Ant Generation Wizard. Historically these two features of the Flex SDK have been hard to set up for beginning to intermediate users. How does SourceMate automate this process and how customizable is the workflow?

Generate-ASDoc-Comments

Building ASDoc is a pain without SourceMate. You have to run the asdoc command from the console and you have to dig up all the appropriate command line arguments from the documentation. Then you have setup all the arguments correctly including the library paths and compiler arguments. It’s a real pain. With SourceMate, you just click through the wizard. SourceMate inspects the project, determines the necessary arguments, gathers any options you specified in the wizard, and executes the ASDoc builder right inside Flash Builder. And when it’s done, SourceMate gives you a hyperlink to the generated documentation.

Using Ant to build Flex applications is very similar. As developers, we create these build scripts so rarely that we’re always digging through documentation to remember what we need to do. Just like with ASDoc, SourceMate will inspect your project and pull out the necessary configuration parameters and create the build.xml for you. SourceMate will even handle complex projects that include modules. The generated build.xml will include the necessary tasks to build the main application and all of its sub-modules using the link reports and any other necessary options. Once the build.xml is created for you, you can customize it however you wish. It’s so much easier to tweak a few parameters when the example is right in front of you.


QWhat other features do you have planned for future versions of SourceMate?

We’ll continue to focus on core productivity features like refactoring and code generation. You can expect to see the list of refactorings to grow pretty rapidly. We also have a few great ideas up our sleeve that we think will make SourceMate even more exciting. And as always, if anyone out there has any ideas or suggestions send ‘em our way at sourcemate [at] elementriver [dot] com.


QAt the end of the day, money talks. It’s hard to get people to spend money on additional software. How do you plan to price SourceMate and when do you think developers will see a return on that investment?

SourceMate will be priced at $79. If you buy SourceMate on a Monday, I’m confident it will have paid for itself by Friday. In some cases, using just one of the refactoring features once can save you 2 or 3 hours of time. With the low price and the abundance of features, we hope every Flex and ActionScript developer will put SourceMate in their toolbelt.


SourceMate License Giveaway!

Ian: We’re giving away a SourceMate License; to be in with a chance of winning it, all you need to do is comment. Make sure to include your correct email address with your comment so that we can contact you. This giveaway is open worldwide, but make sure to get your comment in before midnight this Friday, Pacific Eastern Standard Time.

Please note: Envato staff and people who have written more than two tutorials/articles for a Tuts+ site are not eligible to enter.

Thanks to Jesse and SourceMate for a great interview and stumping up the free license, good luck everyone!

How to Simulate a Torn Flag Animation using 3ds Max and After Effects – Day 1

In this 3ds Max tutorial you will learn how to generate a torn flag animation using cloth simulation, and also how to combine all of the elements, such as the flag, debris, and dust, in order to create to the final scene in After Effects.

This tutorial is Day 1 in a series – Go to Day 2.


Video 1

Download

Note: click the ‘Monitor’ icon to view tutorial in full-screen HD.


This tutorial is Day 1 in a series – Go to Day 2.


Don’t miss more CG tutorials and guides, published daily – subscribe to Cgtuts+ by RSS.

6 Articles That Will Improve Your Writing

(Editor’s Note: This article is a follow-up to a recent piece by WorkAwesome contributor Carl Natale – an article that garnered quite a few comments.)

When I listed tips that can help you improve your writing, I wanted to make writing accessible to people who don’t have much confidence in their writing ability.

But even accomplished writers can use some help. No matter what your skill level, you can improve. The good news is that there is no shortage of advice for improving your writer. After all, writers love to write about writing.

What follows is a collection of blog entries that tackle writing as a craft and offer tips for improvement. No matter how comfortable you are with writing or prolific, you can find something that will help you here.

How Writing Can Be Like Great Sex: 17 Hot Tips

Keep your pants on because this headline is a bit of a tease. Literally. Barrie Davenport prescribes a type of mental Viagra to get the creative juices flowing. And we’re going to stop the sexual metaphor right there. Because there some potential images we just don’t want to evoke. But his 17 tips focus on finding inspiration to write something. He has some good ideas worth trying.

My favorite is very “unsexy.” If you have a topic but are unsure how to work it, create an outline. No one will see it but you. So there’s no harm in just writing phrases or points relating to the topic. This is where index cards come in handy. As you create points you can reorganize them or toss them out easily.

The outline becomes a frame for what you want to write. It will be much easier to fill in the words and finish now you took this step.

10 Tricks For Getting Inspired to Write

OK, if the sex metaphor isn’t doing it for you, Jon Morrows has 10 tips you can do with your pants on. For the most part his tips involve consuming other medium for ideas. These are very practical, good ideas. Although not the final word. He does follow it up with 10 more sources of inspiration.

I go looking for complaints. Complaints are signs of people’s problems. If they care enough to complain, I might be able to put together enough words to help them solve their problems. Twitter and Facebook are gold mines loaded with problems and complaints.

How to Improve Your Writing

Ali Hale recognizes that all writers – even her – have room to improve. It boils down to three basics:

  1. Write As Regularly as Possible
  2. Focus on One Genre of Writing
  3. Read Great Writing

This isn’t quick fix kind of stuff. It’s an investment that takes some time. If you’re short on that, she a 10-minute exercise that you can do daily.

8 Tips to Write a Tutorial That Gets You Noticed

Jessica Howard focuses on how to write a tutorial that goes on your blog. But tutorial writing isn’t just for bloggers. At some point we’re all going to have to write about how to do something. So advice on identifying your audience and avoiding jargon will serve you well. It may be an informal e-mail to the coworker covering you while you’re on vacation or the client who hired you set up a Website.

There are two things worth remembering. One, we’re very visual. Photos of the end product, materials and processes help illustrate what needs to be done. The images also reinforce the steps in our memories.

Two, test it on someone. You know what you meant. But does the reader? It’s easy to skip over information that we know intimately. It may seem too basic to need mentioning.

How to Write a Gear Review

This is kind of a guilty pleasure. Who doesn’t want to be be paid to be a reviewer? You get to sample music, movies, restaurants and all kinds of gear. It may not make you rich but it has a certain cache.

Stephen Regenold writes gear columns for newspapers and offers 8 tips for reviewing packs, outerwear, tents and such. There are some basic tenets that apply to writing all kinds of reviews. Like you’re not to write ad copy. Again, photos help but jargon doesn’t.

5 Common Word Usage Mistakes that Make You Sound Stupid (or Worse, Pompous)

I know I recommended not worrying about grammar so much. But it’s worth recognizing there are some basics you need to master – such as when to use “who” instead of “whom” or “that.” Note that Ann Handley’s list here is not universal. Other people have their pet peeves.

It’s worth reading the comments to pick up more grammar tips and get an idea when you can follow my advice. And thanks to the comments, I learned about the Grammar Girl Quick & Dirty Tips podcast. If you’re going to break some rules, you should know about them before deciding your style can do without them.

By no means is this list exhaustive. There are a lot of resources and blogs with tips. Where do you find great advice on writing?

How Much Sleep Do You Need?

In order to be productive, you need to be well-rested.  Breaks are part of the equation, but you also need to make sure you’re getting enough sleep.  There are plenty of different ways of making sure you’re getting enough “shut eye.”

One method is napping.  When you were a kid you probably had enough of them, but there’s an impressive list of people who couldn’t have achieved what they did without them.  The power nap is a popular way to grab some much-needed sleep during the day and leave you recharged to tackle the rest of it.  But some of us don’t have the type of job that allows for “naptime.”  It’s unlikely your boss would be impressed if they saw you catching some z’s in your cubicle during your workday.

Even if you do manage to get some sleep in throughout the day, you still need to get a good night’s sleep to keep at your productive best.  Which begs the question:

“What is a good night’s sleep for you?”

How much sleep do you need to stay at the top of your game?  Are you getting the sleep you need?  Let us know in the comments…before you “hit the hay.”

The Productivity Rule of Three

Being consistently productive is hard work and it takes a lot of discipline to maintain.  There are tasks and projects coming at you from colleagues.  We all run the risk of information overload thanks to websites, RSS feeds and – most recently – social media.  Even if you have a system in place there are times when it is going to seem impossible to keep up with everything.

So don’t.

If you can get three big things done per day (Leo Babauta refers to them as MITs or Big Rocks), then you’re winning.  You’ll most certainly handle little things here and there that you come across throughout your day – routine stuff – but if you decide that you must get three big things done every day, you’re being really productive.  Be sure to prioritize them accordingly, otherwise you’re going to be doing some tasks that may not move you forward as much as others might.  The mind works well with the number three.  Two seems easy and four seems a bit daunting, but three is like Baby Bear’s porridge…just right.

This isn’t anything new, of course. Productivity experts have been preaching this in some form or another for years.  We just tend to forget about it every once in a while.

So if you find that you’re getting caught up and your wheels start spinning, just roll up your sleeves and do three big things.  You’ll end up doing bigger things down the road if you do.

50 Beautiful Examples of City Skyline Photography

Today we’re taking a look at fifty beautiful examples of city skyline architecture. Some images are captured at night, some in the day, and some in twilight. There’s plenty of inspiration for any urban, city photograph project!


Why Shoot a City?

There are hundreds of beautiful city skylines in the world. Some take their beauty because of the architecture itself, while others are complemented by their natural surroundings. In either case, the way a photographer chooses to capture a particular skyline has just as much impact on the final image as the skyline itself. Even a less-than-stellar skyline can be a work of art in the hands of a skilled photographer.

Below are fifty great skyline photos. There’s a mix of daytime, nighttime, and twilight shots. Some have extensive post-processing while others do not. Not all are professionally taken—it’s obvious some are simply snapshots—but they all capture the essence of the city they feature. Some are taken from odd angles, and while some may argue that they’re not traditional skyline shots, they still have a similar look and are worth inclusion.

Please feel free to share links to your favorite city skyline photos in the comments.


San Diego Skyline 2 by WouteR

Tower Bridge & Skyline – London, England by Trodel

Skyline – Hong Kong, China by Trodel

The lighting and long expsoure time here really make the lights of the city stand out and create an almost ethereal look.

Jakarta Skyline Part 2 by yohanes budiyanto

Richmond Skyline and James River by taberandrew

Don’t disregard the foreground when taking a skyline photo. The river and trees turn what might have been a very ho-hum photo into something more special.

Louisville Skyline by The Pug Father

A Night View of Skyline of Portland, Oregon by Curt Deatherage

Toronto Skyline by ChoudhrySaab

The Living Skyline by kennymatic

Shanghai Pudong Skyline by pamhule

New York Skyline by wwarby

Skyline – Paris, France at Night by Trodel

Singapore Skyline by redeye^

Skyline – San Diego, California at Night by Trodel

Manhattan Skyline (Panorama) by Francisco Diez

Skyline. by Sarah Jane

Hong Kong Skyline by das farbamt

New York City Skyline by ajagendorf25

SF Skyline by angeloangelo

Weather patterns, like the fog here in San Francisco, can often add extra depth and interest to your photos. The tower in the background appears larger than it actually is since its base is obscured.

Frankfurt Skyline by icarus_shift

Seattle Skyline with Mount Ranier From Kerry Park Stitch by Walakazoo

Sydney by Corey Leopold

Sydney Skyline by jemsweb

Seattle Skyline by papalars

New York Skyline by geoftheref

New York Skyline Sunset 2 by thenails

City of Gold – Hong Kong by Dennis Wong

From the North Shore by kennymatic

Dark City 2 by fehlart

Another fantastic example of how weather can really add depth and interest to a photo.

City of Lights by paul (dex)

Good Morning Toronto by purplepick

Puget Sound Just Before Dawn by joiseyshowaa

Boston Back Bay at Night by Werner Kunz

Chicago HDR 1 by dielotr

The Needle & Rainier by papalars

California San Francisco by Benjamin Rossen

Southbank Waiting 12 by Looking Glass

Sunset Skyline by Sienar

Just Beautiful by gyverchangphotos

Calgary Skyline by LipBomb

Buenos Aires – Night Pano by lrargerich

Saint Paul from Mounds Blvd by StArHaCkT

I Still Call Rialto Home by

Hong Kong Island Light Show by calloutLOUD

Brisbane Skyline at Night by slord

Skyline – New York City, New York at Night by Trodel

New York City Skyline by hyunlab

City Skyline by jordanpermenter

The skyline itself stands out more here because of the expanse of sky above it.

The Skyline by ecksunderscore

San Fransisco by TenSafeFrogs

Your First WordPress Plugin: Simple Optimization


WordPress is the largest blogging platform available on the internet today; and with the official release of version three just around the corner, it’s only going to get bigger. As such, over the next few self-contained tuts, we’re going to learn the ins and outs of WordPress plugin development, starting with the creation of our first simple plugin, “Simple Optimization.”


Step 0 Before we Begin

This tutorial is going to assume that you have at least a beginner’s understanding of PHP and the WordPress syntax. Though we’ll be covering everything, some knowledge beforehand will help you grasp the concepts much more easily. I’ll also assumes that you have a WP blog setup and ready to go.


Step 1. What our Plugin Does

The very first step, when writing a WP plugin, is to determine everything you want it to do. Since this is our first plugin, we won’t do anything too drastic. Let’s create something which will speed up our blog; our pages will render faster, and we’ll also do a little SEO to improve our search rank and findability.

“Always create a list of what you want your plugin to actually do before you write any code!”

Remove useless meta tags:

  • “rsd_link” – Really Simple Discovery Link
  • “wlwmanifest_link” – Windows Live Writer link
  • “wp_generator” – WordPress version number

Remove unnecessary filters:

  • “wptexturize” – Curly quotes
  • “wp_filter_kses” – HTML in user profiles

SEO:

  • Insert post tags into <head> as keywords
  • Insert post excerpt into <head> as description

Step 2. Laying the Groundwork

To start, navigate to your plugins folder (“/wp-content/plugins/”), and create a new folder. We’ll call ours “simple-optimization.” Next, inside of this folder we’re going to need to create two files. The first will be the actual plugin file (named “main.php”), and the second will be the mandatory README (“readme.txt”). We’re going to leave readme.txt empty for the time being; so open main.php in your preferred text-editor and copy in the code below.

    <?php
/*
Plugin Name: Name Of The Plugin
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: A brief description of the Plugin.
Version: The Plugin's Version Number, e.g.: 1.0
Author: Name Of The Plugin Author
Author URI: http://URI_Of_The_Plugin_Author
License: A "Slug" license name e.g. GPL2
.
Any other notes about the plugin go here
.
*/
?>

This text is the bare-bones minimum needed for a plugin to appear in the WordPress plugin directory. You’ll obviously need to fill each part as you see fit.


Step 3. Adding Features

The first two features we’re going to implement will also be the simplest. By default, WordPress adds several meta-tags to the <head> section of your blog, but the simple fact of the matter is that these meta-tags have absolutely no value at all; so we’re simply going to stop WordPress from adding them. Anytime WordPress performs an action, it’s either called a filter or an action, and we can either remove or manipulate these filters and actions (you can find a list of all the filters here, and all the actions here). In this case, we want to remove the various actions that add those meta-tags.

To do so, we use a very simple function called “remove_action(‘action’,’function’)”. This function will remove the function declared in the second parameter from the action, the first parameter.

// Clean up wp_head
// Remove Really simple discovery link
remove_action('wp_head', 'rsd_link');
// Remove Windows Live Writer link
remove_action('wp_head', 'wlwmanifest_link');
// Remove the version number
remove_action('wp_head', 'wp_generator');

The same exact same principle applies to the two filters we’re going to remove:

// Remove curly quotes
remove_filter('the_content', 'wptexturize');
remove_filter('comment_text', 'wptexturize');

// Allow HTML in user profiles
remove_filter('pre_user_description', 'wp_filter_kses');

Step 4. SEO

Now that we’ve cut out that bloat, let’s ensure our blog has some basic SEO; meaning, let’s make sure we have keywords per-page, which correspond to that page and change the description to match more with the article. For our keywords, we’re going to grab the tags of the current page/post. This is made super simple by the function “wp_get_post_tags()”. wp_get_post_tags will return an array of tags from the current post. We can then easily format this array into a string and place it within our header (inside the function “wp_head()”, that every theme should have in it already) by attaching our function to the wp_head action.

Let’s start out by creating a new function, tags_to_keywords(), and, inside of this function, we’ll write a simple if statement, which checks to see if the current page is a single post or page (using the WP functions: is_single() and is_page()). Next, we’ll create a variable inside this if statement, named $tags, and set its content to the function wp_get_post_tags(); however, in order for this function to work, we need to pass in a parameter of “post_id”. The easiest way for us to obtain that is to globalize the WP variable $post which contains the post ID ($post->ID, $post is an object which is why we’re calling its values like so).

// SEO
// add tags as keywords
function tags_to_keywords(){
    global $post;
    if(is_single() || is_page()){
        $tags = wp_get_post_tags($post->ID);
    }
}

Next, we’ll use a foreach to filter through the $tags data, and create a new array with only the information we want ($tag_array). Following that, we’ll implode the array into a string and separate each item from the array with a comma and space ($tag_string). Then, we’ll create another if statement that checks to see if $tag_string has a value (meaning, do we have any tags for the post) and if it does, echo out the final HTML.

function tags_to_keywords(){
    global $post;
    if(is_single() || is_page()){
        $tags = wp_get_post_tags($post->ID);
        foreach($tags as $tag){
            $tag_array[] = $tag->name;
        }
        $tag_string = implode(', ',$tag_array);
        if($tag_string !== ''){
            echo "<meta name='keywords' content='".$tag_string."' />\r\n";
        }
    }
}

The last thing we need to do now is attach our new function with the wp_head action. To do this, we’re going to call add_action(‘action’,’function’), and pass it the parameters “wp_head” and “tags_to_keywords” (in that order).

add_action('wp_head','tags_to_keywords');

To further increase our SEO, we’re going to add our description meta-data to the header as well, using the same method as the keywords. Once we have the if statement rewritten, we’re going to create a new variable $all_post_content and fill it using the WP function wp_get_single_post() (and pass the parameter of $post->ID). This will give us an object full of all the data about our post. With this variable, we can create a description using the actual content of the post, but we’re going to shorten it down to one hundred characters using the function substr ($excerpt). And then, we’ll just echo out the HTML with the excerpt written in. (Optionally, you can also add an else statement, and echo your blog description using the function get_bloginfo(‘description’).)

// add except as description
function excerpt_to_description(){
    global $post;
    if(is_single() || is_page()){
        $all_post_content = wp_get_single_post($post->ID);
        $excerpt = substr($all_post_content->post_content, 0, 100).' [...]';
        echo "<meta name='description' content='".$excerpt."' />\r\n";
    }
    else{
        echo "<meta name='description' content='".get_bloginfo('description')."' />\r\n";
    }
}
add_action('wp_head','excerpt_to_description');

Step 5. Optimizing the Database

The final feature for our plugin is going to optimize our database tables by removing overhead (useless/excess data in a SQL table created by manipulating the database). To begin, we’ll create a new function (optimize_database), and inside of it, we’re going to call the global WPDB variable ($wpdb). That way, we can interact with the database, without having to re-enter our authentication details. $wpdb has several methods you can use to interact with and retrieve information from the database (Full list here), but we’re only going to be using one, get_results. Using get_results with the parameters of “SHOW TABLES” and “ARRAY_A” will return to us an associative array of all the table names in the database. At that point, we can use a foreach to loop through each of the array values (using array_values to get the table name, because of how it’s layered by the function) and use another $wpdb method, query to run the optimize command (“OPTIMIZE TABLE _____”).

//Optimize Database
function optimize_database(){
    global $wpdb;
    $all_tables = $wpdb->get_results('SHOW TABLES',ARRAY_A);
    foreach ($all_tables as $tables){
        $table = array_values($tables);
        $wpdb->query("OPTIMIZE TABLE ".$table[0]);
    }
}

While this function works, it will never actually run because WordPress has no way to know to run it. Luckily, WordPress has a feature called cron, which schedules functions to run at specific intervals (daily, weekly, etc…); this is perfect for us, since we want to frequently optimize our database. To use Cron, we’re going to create a new function (simple_optimization_cron_on), and fill it with another function call to wp_schedule_event(). To work, wp_schedule_event needs three things: a time to run, an interval between each run, and a function to call; so we’ll pass it the parameters: ‘time()’ (we’ll assume that whenever the cron event is created is a good time to call the function), ‘daily’, ‘optimize_database’ in that order.

function simple_optimization_cron_on(){
    wp_schedule_event(time(), 'daily', 'optimize_database');
}

Great, now we have our optimize_database function being added to the WP cron list, or we would if we were to call the simple_optimization_cron_on function. It’s really unsafe and is a bad practice to call your own event addition functions, because through some arbitrary system of events, it could cause the function to be called multiple times. WordPress happens to have a set of specific hooks for plugins to solve this problem: register_activation_hook and register_deactivation_hook. These functions are called when a plugin is turned on (activated) and turned off (deactivated). This way, our cron function can only be added once. Now, we have the ability to remove the cron event if the plugin stops being used. To work, these functions need two pieces of information: the url to the file that has the activation and deactivation functions (99% of the time “__FILE__” will work perfectly here), and the name of the activation and deactivation function. We’ll also create a new function (simple_optimization_cron_off), and fill it with a call to another function (wp_clear_scheduled_hook(‘optimize_database’)) to delete our cron event.

function simple_optimization_cron_off(){
    wp_clear_scheduled_hook('optimize_database');
}
register_activation_hook(__FILE__,'simple_optimization_cron_on');
register_deactivation_hook(__FILE__,'simple_optimization_cron_off');

Step 6. Filling out the ReadMe

The last thing we need to do for our new plugin is fill in the readme.txt file. The readme.txt file is used by the WordPress Plugin directory to display all the information you provide it about your plugin. The best way to learn how to write an effective readme.txt file is to download the default from WP, and alter it accordingly to fit your plugin. Since ours was so simplistic, this is what I personally ended up with:

=== Simple Optimization ===
Contributors: Jonathan Wolfe
Plugin link: http://net.tutsplus.com/
Tags: simple, optimization, keywords, tags, description, SEO, optimize, database
Requires at least: 2.5.1
Tested up to: 2.9.2
Stable tag: trunk

Silently adds several optimizing functions to the WordPress back-end to make your blog or site run faster.

== Description ==

Simple Optimization adds several functions to WordPress that help trim the fat from the system and also clean up after itself a little bit all leading to a faster loading time for your blog or website.

**Features**
_Remove useless meta tags:_
* "rsd_link" - Really Simple Discovery Link
* "wlwmanifest_link" - Windows Live Writer link
* "wp_generator" - WordPress version number
_Remove useless filters:_
* "wptexturize" - currly quotes
* "wp_filter_kses" - HTML in user profiles
_SEO:_
* Insert post tags into <head> as keywords
_Routinely optimize the database_


== Installation ==

1. Download, unzip and upload to your WordPress plugins directory
2. activate the plugin within you WordPress Administration

That’s it!

You just successfully wrote your first WordPress plugin, which is working and ready for the WP Plugins Directory. Along the way, you learned about filters and actions, using WP global objects, a lot about the WordPress nomencalture, how to interact with the database, cron events, and activation/deactivation hooks. If you have any questions, please leave a comment and I’ll respond as soon as I can.

The final code:

<?php
/*
Plugin Name: Simple Optimization
Plugin URI: http://net.tutsplus.com
Description: A super-simple plugin to improve your blog
Version: 1.0
Author: Jonathan Wolfe
Author URI: http://fire-studios.com
License: GPL2
.
This plugin written for NETTUTS at http://net.tutsplus.com
.
*/

// Clean up wp_head
// Remove Really simple discovery link
remove_action('wp_head', 'rsd_link');
// Remove Windows Live Writer link
remove_action('wp_head', 'wlwmanifest_link');
// Remove the version number
remove_action('wp_head', 'wp_generator');

// Remove curly quotes
remove_filter('the_content', 'wptexturize');
remove_filter('comment_text', 'wptexturize');

// Allow HTML in user profiles
remove_filter('pre_user_description', 'wp_filter_kses');

// SEO
// add tags as keywords
function tags_to_keywords(){
    global $post; // Get access to the $post object
    if(is_single() || is_page()){ // only run on posts or pages
        $tags = wp_get_post_tags($post->ID); // get post tags
        foreach($tags as $tag){ // loop through each tag
            $tag_array[] = $tag->name; // create new array with only tag names
        }
        $tag_string = implode(', ',$tag_array); // convert array into comma seperated string
        if($tag_string !== ''){ // it we have tags
            echo "<meta name='keywords' content='".$tag_string."' />\r\n"; // add meta tag to <head>
        }
    }
}
add_action('wp_head','tags_to_keywords'); // Add tags_to_keywords to wp_head function
// add except as description
function excerpt_to_description(){
    global $post; // get access to the $post object
    if(is_single() || is_page()){ // only run on posts or pages
        $all_post_content = wp_get_single_post($post->ID); // get all content from the post/page
        $excerpt = substr($all_post_content->post_content, 0, 100).' [...]'; // get first 100 characters and append "[...]" to the end
        echo "<meta name='description' content='".$excerpt."' />\r\n"; // add meta tag to <head>
    }
    else{ // only run if not a post or page
        echo "<meta name='description' content='".get_bloginfo('description')."' />\r\n"; // add meta tag to <head>
    }
}
add_action('wp_head','excerpt_to_description'); // add excerpt_to_description to wp_head function

//Optimize Database
function optimize_database(){
    global $wpdb; // get access to $wpdb object
    $all_tables = $wpdb->get_results('SHOW TABLES',ARRAY_A); // get all table names
    foreach ($all_tables as $tables){ // loop through every table name
        $table = array_values($tables); // get table name out of array
        $wpdb->query("OPTIMIZE TABLE ".$table[0]); // run the optimize SQL command on the table
    }
}
function simple_optimization_cron_on(){
    wp_schedule_event(time(), 'daily', 'optimize_database'); // rdd optimize_database to wp cron events
}
function simple_optimization_cron_off(){
    wp_clear_scheduled_hook('optimize_database'); // remove optimize_database from wp cron events
}
register_activation_hook(__FILE__,'simple_optimization_cron_on'); // run simple_optimization_cron_on at plugin activation
register_deactivation_hook(__FILE__,'simple_optimization_cron_off'); // run simple_optimization_cron_off at plugin deactivation
?>