You are browsing the Technology & Science category.

Backup your Tweets with Tweet Nest

Backup your Tweets with Tweet Nest

Twitter has an API limit of approximately 3,200 tweets. This means that when your tweet count exceeds that number then you will no longer be able to view all of them up to your first tweet. This has frustrated many tweeters and so there are now many ways to backup tweets.

I registered @littlewolf August 29, 2006, just a month after Twitter opened to the public.

image

I shared my twitter history in a post back in 2009.

Although this account is one of the first 5000 accounts created on the site (how do I know? I’ll explain later), I have not been a consistently active tweeter. Because of this, my tweet count is still far from reaching that API limit as of today. But I’m not gonna wait for that milestone so I’m backing up my tweets early.

Sadly, if your own Twitter account has more than 3,200 tweets then you will only be able to backup your 3,200 most recent tweets. Twitter’s FAQ seems to be promising this will change in the future.

Why can’t I see all my tweets? My tweet count is _,___. Are they lost?
The good news is they’re not lost or gone! We have all your tweets. The bad news is that we currently only allow you to see the 3200 most recent tweets (this could also be construed as good news, as that number could be lower than 3200). The other good news is that we are eventually going to build something that will allow you to see ALL your tweets. Among the gazillion things we want to do to make Twitter better, this hasn’t yet reached the top of our list, which is largely based on what we hear from people like you. At some point, you’ll be able to get on a twime machine, visit your twistory, and tweminisce. That will be a fun day!
(source)

The best (and coolest!) way to backup your tweets is by mirroring them to another site. You don’t need to be paying a webhost to do this. You can set it up right on your local computer with XAMPP. But that is outside the scope of this article and I will be continuing with the assumption that you have some knowledge of the basics of setting up websites.

image

Tweet Nest requires at least PHP 5.2 and MySQL 4.1. This tutorial will demonstrate installing Tweet Nest on a LAMP server with cPanel. In other words, the server this website is on. If you’re using XAMPP, the steps in Part 1 should be similarly applicable. Part 2 will not be applicable to XAMPP so you’ll have to look for other ways to automate the tweet grab on your computer.

Part 1 – Installing and Configuring Tweet Nest

  1. Download Tweet Nest and extract the zip file.
  2. Upload all the files inside the “tweetnest” folder to a directory in your website.
    I uploaded mine to a folder called “tweets” under the URL http://historicity.syaoran.net/ which is where I intend to put all this history stuff.
  3. Have your MySQL database details ready then go to your Tweet Nest URL.
    Fill out the setup form with your Twitter username, timezone and so on.
    image
  4. Specify an Admin Password so you can also load tweets using the browser and not just through cron. DO NOT make this the same as your Twitter password or any important password!
    image
  5. (Optional) For the @Anywhere API key, sign in on Twitter’s Developer site.
    Create an app with “Read only” access.
    image
    Your @Anywhere API key is the Consumer key.
    image
    Specifying an @Anywhere API key will let your page have hover cards as shown below.
    image
  6. Submit the form to begin grabbing your tweets. Be patient because this may take a while. Once done, do not leave or close the page yet!
    image
    Notice my User ID. It’s below 5000, like I said before. I liked trying new web startups back then. Not so much anymore today because they’re popping up everywhere like mushrooms. Check out this tool if you want to know your Twitter user ID too.
  7. At the bottom of the “Loading tweets” page, you will see a line with a command. Copy this command. We’ll use it in Part 2.
    image
  8. Now you may visit your very own Twitter backup page!
    Click the image below to view mine.
    image

Part 2 – Automating the Backup using Cron

The file maintenance/loadtweets.php will need to be run regularly to update your Tweet Nest install with the latest tweets. Best to let a cron job do this for us. Most webhosts have cPanel which offers a quick way of adding a cron job.

  1. Log in to your website’s cPanel page.
  2. Go to the Cron page.
  3. Add a new cron job. I scheduled mine once a day.
  4. Paste the command you copied in step 7 of Part 1 above.
    image
  5. Submit the form. If you chose to receive an email each time the cron job runs, you will get one like below.
    image
    I recommend you enable this to be sure your tweets are being backed up.
  6. Add a cron job also for the maintenance/loaduser.php file to grab changes in your Twitter profile such as icon and location. I did mine once a day too.
  7. If you want to update your Twitter backup manually without waiting for the cron job to run, simply visit the loadtweets.php file from your browser.
    You will be asked for the admin password you gave in step 4 of Part 1.
    The username is your Twitter account.
    image

If you want to customize the look of the page, there are some style settings you can play with in the inc/config.php file.
image

And we’re done! Now whatever happens to your account or even if Twitter goes out of business, you’ll still have all your precious tweets with you. Thanks to Tweet Nest!

3 Comments

Speed Up Your Blog with Google App Engine as CDN

Speed Up Your Blog with Google App Engine as CDN

image

  • Are you in a shared hosting account? / Is your blog hosted on a slow server?
  • Does your (WordPress) blog use a lot of plugins?
  • Is your website’s design heavy in graphics?

If you answered yes to all of that then you should consider offsetting some of your site’s load into a CDN.

A content delivery network (CDN) is a collection of web servers distributed across multiple locations to deliver content more efficiently to users.
(source)

One popular CDN-service provider is Akamai. If you see a website connecting to an akamai.net URL during page load, that’s one example of a website using CDN for its content. Big sites commonly use CDN for files like audio and video. But for small-time bloggers like us, we will more likely use it to host JS, CSS and image files.

Distributing your content to different servers (but not too many) could improve your page load times. It can give your visitors the illusion that your site is loading more quickly.

For WordPress, there’s a plugin to automate usage of Google-hosted Javascript libraries like jQuery. But if you prefer to do this manually, simply refer to the Google Libraries API page. Using Google’s public copies of the popular JS libraries is almost a must now, unless you have customized these files yourself.

I have personally experienced getting frustrated before by my blog’s loading times so I finally decided to take steps in improving its performance. One effective way of measuring your site’s performance is through YSlow. This Firefox add-on will also suggest using a CDN if you are not yet using one.

In this article, I will be listing the steps I took to host this blog’s image and JS files into Google’s servers. I got the idea to use Google App Engine as a CDN here. You can follow that one if you want a shorter guide. I have written a more detailed walkthrough here.

  1. Sign up for Google App Engine. If you’re a small blogger like me, it’s more than likely you will never need to pay for extra resources in Google App Engine so this service is effectively free!
  2. Download and install Python.
    In Windows 7, I installed Python 2.7.2 using the MSI file.
  3. Download and install the Google App Engine SDK for Python.
  4. Create an application. The Application Identifier will be part of your CDN’s URL.
    image
  5. Open the Google App Engine Launcher. Go to File > Create New Application. The Application Name is the same as the Application Identifier. Choose a folder in your computer where you’d put all your CDN-hosted files.
    image
  6. Put some files in that directory. I created folders to organize my files.
    image
  7. Edit app.yaml in a text editor. With the two folders I created, my app.yaml file looks like this:
    application: littlewolf
    version: 1
    runtime: python
    api_version: 1
    handlers:
    - url: /images
    static_dir: images
    - url: /styles
    static_dir: styles

    Detailed documentation can be found here.

  8. If you’re using 2-step verification in your Google account, you need to get an application-specific password for your new Google App. Go to your Google Accounts page and click on “Edit” beside “Authorizing applications & sites”.
    image
  9. Enter the application identifier for the name then generate a password. You’ll need the password each time you deploy the application (when you have made changes to your local CDN folder) so save it somewhere easily accessible.
    image
    If you’re not using the 2-step verification then use it! It’s an additional layer of security for your Google account. Stop typing your Google primary password everywhere.
  10. Deploy the application by clicking the button.
    image
  11. Enter your Gmail address and the application-specific password generated in step 9.
    image
    You will get a log window showing the progress of the deployment. If no errors are shown, close the window.
  12. Try accessing your CDN-hosted files directly by URL. Here’s an example showing my header image for this blog.
    image

You can now use these links in your blog template. In my case, I’ve uploaded to Google most of my bigger image files. I also grabbed Shelfari’s Javascript widget file and hosted it there. These big files were slow to download in a shared hosting server and was therefore one of the weak points in my blog. Run tests with YSlow to investigate similar things in your blog.

Using a CDN is just one aspect of site optimization. A blog’s slow performance is more often caused by many factors. But the easiest fixes to apply like CDN, minifying and caching have the biggest potential to bring noticeable improvements to your blog so there’s really no reason not to try them.

Write a comment

Z1-Ultra : New Favorite Theme for Opera

Z1-Ultra : New Favorite Theme for Opera

I just upgraded to Opera 11.50 (thanks to WordPress 3.2’s Browse Happy integration) and found this slick theme for Opera. I’ve been using the default theme for quite a long, long time now and never really felt the need to replace it with anything fancy. I’ve always had the feeling that these non-default themes can slow things down. But I tested this one, ended up customizing it again to suit my needs and voila! Behold my current Opera setup.

(click image for the full screenshot)

So much transparency but that is just fine with me. I guess. Sometimes I dislike this translucent stuff but when I’m in the mood for something different, they’re good.

And as for the speed, I didn’t notice any significant slowdowns and I think the days of themes wrecking Opera’s performance are over. Well I’m sure there are still bad themes out there but Opera has just improved so much since the first time I used it many years ago that it would take a lot to negatively affect it now. I’m okay with using custom themes now but I’m still not a fan of their extensions. Opera works great already out of the box that any extension would only be an unnecessary bloat to the program. And it’s not like I don’t use other web browsers too so there’s Firefox for web development and Chrome for… uh, Google stuff?

You can download the Z1-Ultra theme here:
http://my.opera.com/chooseopera/blog/2011/07/04/a-featherweight-lovechild

Write a comment

The Privileged Planet – A Documentary Review

The Privileged Planet – A Documentary Review

Astronomy has always fascinated me ever since I was a small kid. It’s no big secret that I dreamed of becoming an astronaut. And I still hold to this day my opinion that dying in space is the coolest way for a human being to die. It’s quite literally out of this world! But I digress…

The Privileged Planet

The Privileged Planet is a 1-hour documentary claiming that Earth is a special place in the cosmos. The film offers both scientific and philosophical reasons as basis for this idea. It’s basically an argument for Intelligent Design (ID) in the universe. The movie also postulates that Earth is privileged for scientific discovery given its prime location in the solar system and the Milky Way galaxy. Although it was released in 2004, the CG animation doesn’t feel quite as dated and the production looks like what you would often see in the History Channel or National Geographic.

solar system habitable zone

Life here on Earth developed and continues to thrive because of several factors that are “just right”. Change one of these even just at a miniscule-scale and we won’t be here to tell this story. One factor, for example, is that Earth is in that habitable zone of the solar system. If Earth were any closer or farther from the Sun, complex life wouldn’t exist here. Another factor is if the solar system didn’t have Jupiter, life wouldn’t prosper here because of the imminent danger posed by asteroids and meteors.

complex life factors

I already knew many of the astronomical facts detailed in this movie but never really thought of using them as arguments for Intelligent Design. Although I’ve never really considered taking an active stand on ID or even opposing the Darwinian theory of evolution. Life hasn’t really offered that opportunity yet to make me choose one side and I honestly never really want to. I think that’s the beauty of science. We can all speculate about all this stuff as long as we can since most are theoretical. But again, I digress.

The fact that our Moon is 400 times smaller than the Sun and the Sun is 400 times farther than the Moon makes total solar eclipses possible here on Earth. (Of course, the Moon is getting farther away from the Earth but it would take billions of years for it to be significantly farther than where it is now.)

total solar eclipse

This relation of size and distance between the Moon and Sun has made it possible for scientists to study the atmosphere of the Sun or its corona which can only be observed during a solar eclipse. If the Moon was any bigger or smaller or if the Sun was nearer or farther from the Earth, scientists would not be able to observe and study the Sun’s corona and we would still be ignorant of what makes a star’s atmosphere. More importantly, eclipses of the Sun is one of the things which confirm Einstein’s theory of relativity, that light bends around objects of mass in space – a phenomenon known as gravitational lensing.

The movie uses facts such as this to support the argument that the universe seems to have been “intelligently designed” for humans to study it. The movie goes on to many other factors such as humans being able to use the most important part of the light spectrum for observation (visible light), a galactic habitable zone and so much more.

Personally, I think the size and distance relation of the Sun and Moon is just too much of a coincidence for it not to have a purpose. And we humans are living right in the time when this relation between them still exists, not the time before or after! I think that’s nothing short of miraculous.

incomprehensible einstein quote

“The most incomprehensible thing about the universe is that it is comprehensible.”
~ Albert Einstein ~

I have to admit that I got a bit teary-eyed watching this and realizing how it all fits with my faith and everything I have come to understand about this world. At one point, I even looked away from the movie and gazed into the blue sky outside my window ruminating about how inspiring all this is. Corny but I really liked how this movie made me feel after seeing it.

However, I still hope humans will find complex extra-terrestrial life out there someday. The astronaut in me still wishes that we are not alone. I mean, I hope we don’t send generations of humans to a distance star system only to find extremophiles in its planets. I am hopeful there’d be civilizations too. Kind and compassionate ones I also hope.

I am particularly disappointed that this movie didn’t even give its own calculation of the probability (or improbability) of finding complex life given the several facts it has presented. Perhaps this was only an overview of the theory and one would also need to read the book this documentary was based on if they wanted more detail.

galactic habitable zone

I understand that the conditions for complex life to thrive is very precise and almost impossible but here we are as proof that it is possible. And given the vastness of space and age of the universe, I am inclined to believe that Earth is not the only one in history that has met these requirements for life. But if advanced human civilizations in the future does prove me wrong and that Earth really is special (well maybe they could terraform other planets but those don’t count), then I don’t think you could find a stronger scientific evidence for an intelligent design.

The movie is not trying to offer conclusive evidence that we are special in the universe. That is not its goal. What it does offer is a good argument for believing that Earth, especially us, was created (or evolved, if you prefer that) for a purpose.

Write a comment

5 Lessons in 2010 : Lesson #4 – The Humble Programmer

5 Lessons in 2010 : Lesson #4 – The Humble Programmer

And you thought all the lessons would come out of books. Well, you were wrong because I do read on the Internet too. A lot, actually.

2010-lessons-4

Lesson #4 – The Humble Programmer

A mature programmer knows that he does not know everything. He realizes that our field continuously evolves, and that better ways of doing things are invented all the time. He is not afraid of saying “I don’t know”, and he is always ready to learn from anyone who might know something he does not. He does not put his own ego above the truth.

Oh, and by “he” I mean “he or she”.

~ Quote taken from a question at the StackExchange site for Programmers.

Indeed, this is true for probably all types of profession in the world.

Humility is something which no one seems to really value nowadays. The world would have us believe that the way to get ahead on things is through a conceited self-esteem or an overbearing pride of one’s abilities. That’s a lie. It was wrought by our egocentric modern culture so now, everyone acts like their experts of something. (Well, look who’s talking.) But that can’t be because no one knows everything. Even the lowliest person in a company knows something the CEO is completely unaware of.

I learned the important things I needed to know not at school but at the workplace. That’s why it’s important for a programmer to be constantly open to feedback and criticism, the constructive type at least.

In software development teams, the members need to be able to “gel together” or they would risk efficiency and productivity. But the sad truth is that the perfect team is a rarity. More often than not you’d at least have one member who doesn’t go very well with the others and the worst news is you can’t just get rid of him.

That said, I prefer not to be that annoying guy of the team. And I find that the best way to assure you won’t be that person is by having the most important trait an “exceptional programmer” has — humility. It’s just easier to work with someone whom you know wouldn’t take things personally when the time comes to churn out tons of code.

One benefit is it would make code reviews much easier and less hostile. The humble programmer would even be ecstatic to discover that there is a more efficient way of coding that function. In contrast, the proud programmer would always be on the defense and will regard your criticism as a threat to his image. In mindset terms, he is of the “fixed mindset” type.

But that’s not to say that the humble programmer would unquestioningly accept all suggestions as if they’re gospel truth. No, in a healthy exchange of programming ideas both parties explain in a diplomatic way the reasons for their stand until they agree on the appropriate solution for the issue at hand. Obviously, not all issues would end up like this since different programmers have different programming styles. What seems the best way for one programmer may be a very inefficient solution in the opinion of another. Still, the humble way of dealing with differences makes discussions less stressful and could only create a good working atmosphere in the team.

I write these things here because I have personally experienced the benefits of having a great programming team. I can only hope that more programmers would learn and apply this important lesson to make our lives easier. After all, we all got here for the same reason: our love to code. And I’m sure you wouldn’t want to be a burden to any of our like-minded brethren, would you?

To quote Tyler Durden in Fight Club: “You are not special. You are not a beautiful or unique snowflake. You’re the same decaying organic matter as everything else.” There is always someone who knows more, can do things better/faster than you; to think otherwise is silly and shows lack of maturity or lack of exposure to the world at large.

~ response to a question at programmers.stackexchange.com: “Help me learn to program with humility?”

(Photo credits in banner)

 

Write a comment

Really? – The Best Cellphone Ad

Really? – The Best Cellphone Ad

The message is quite simple, really. And I can truly relate to this video because I personally have experienced wanting to say “Really?” to a lot of people I encountered who are just too self-absorbed in their cellphones causing themselves to get into embarrassing situations.

It’s funny — how cellphones have made people less communicative and social which is an irony, really if you think about it. But the really more shocking irony in this video is the fact that the solution being proposed happens to be a phone too!

But I do commend the team behind this really creative ad for delivering something that describes a part of human nature that is both true and ironic. Oftentimes, the things that seemingly solve our problems really just make it worse. Problems which are not thoroughly analyzed get really hasty and not well thought out solutions and these could only end up as disasters.

Back to the ad, I’m not really impressed by the phone though because, Windows Phone 7? Was that really the best name they could think of? Sadly, the best thing about this whole campaign is the ad and not the product and the best part of that ad is the men’s room scene which is just… I don’t really know what to say.


Really?

Really?

So, the next time you use that phone, try to remember also that there’s a world outside of that thing in your hand and really, this also applies not just to phones but to most gadgets of today. Now, if you really have been paying this article due attention, you would have been concerned enough to notice that each sentence in this article used the word “really” at least once.


4 Comments

The Best of Pinoy Web (week ending 03/12/2010)

The Best of Pinoy Web (week ending 03/12/2010)

best-of-pinoy-web-03-12-2010

Every day, I scour the Pinoy web to find the most interesting Philippine-related articles, tweets, pictures and videos of the week. Then every Sunday, I share my best finds here.

2010 Philippine Elections

Women candidates in the 2010 national elections

Newsworthy

(Photo) Filipino boxing icon Manny Pacquiao tries to hush up the crowd as he and Ghana’s Joshua Clottey break up in a laughter…

(Photo) Pound-for-pound king Manny Pacquiao seemingly enjoys a playful punch from Dallas Cowboys Michael Irvin

The New ePassport: No long queues, delivery available

Entertainment: Music, Movies and TV

FOX, World’s No. 1 US TV series channel now in the Philippines

Breaking News: ‘Alice’ Grosses P47.9-M in 4 Days, Opens at No. 1 in the Philippines

‘Miss You Like Crazy’ Earns P114.7 M in 2 Weeks

Joshua Davis a.k.a. The Yoyo Tricker wins in Talentadong Pinoy’s Battle of the Champions

Paramore concert live in Manila 2010 – Azrael’s live blogging and plurk updates

Super Junior will perform at the Big Dome on April 10

(YouTube) XLR8 – You’re So Hot [Full Song - radio rip]

Melason

Technology

Why is 4G/WiMax in the Philippines slow?

Notable Tweets

#myxmusicawards thanks @RealDonitaRose for coming! last award favorite music video goes to @sixcyclemind @glocdash9 for “kasalanan”!
~ MYXphilippines

Good News: Jollibee has started rolling out free WIFI in its restaurants, powered by SmartBro and/or AirborneAccess
~ tonyocruz

enter to win a writing scholarship from writers block philippines!! visit http://writersblockphilippines.com/ for more info!
~ manilamommy

German Moreno is slowly beginning to resemble Juan Ponce Enrile. There’s a theory that all humans start to look alike once they hit 100.
~ gangbadoy

Life

Form or Goal?

Have You Ever Fought for the One You Loved?

Do You Feel Useless?


Think I missed something really cool last week? Feel free to share it in the comments. :)

Write a comment
  • Currently reading…

  • Just finished reading…

    Shelfari: Book reviews on your book blog

    Check out my book blog for more! The Bookish Pinoy
    The Bookish Pinoy
  • Etcetara…

    Proudly Pinoy!

    Personal - Top Blogs Philippines
  • Follow me on Facebook