How to Use Intel’s PIN program: A super simple tutorial

If you’re reading this, you probably already know what pin is for, but basically it is used to profile programs. You can use it to answer things like how many instructions does this executable have or how many branches occur, etc. It does this in most cases by inserting counters and other code while your executable is running. So let’s get to a quick demo.

I will be demonstrating with Linux, specifically with Ubuntu, because this was a headache on Windows. Note that you might need root permission to execute some of these commands, so if they don’t work, try re-running with sudo.

(1) Download the pin program tarball
Download the tool from here, making sure that you have a compatible version of gcc. Continue reading

Freelance Photographer

This was from a conversation between two classmates years ago when I was in high school. Thinking about it today still makes me laugh and I wonder if either of them might one day stumble upon this and remember, too. (Names changed for privacy.)


 

Alan: What does you mom do?

Judy: My mom is a freelance photographer.

Alan: What does that mean? Free of job?

Judy: No! It means she works whenever she wants to.

Alan: . . . Yeah. Free of job.

Things I Wish I Knew for Hajj

Before Hajj, I would have been glad to know a few things about the way it works over there. The following is a list of stuff that I wish I new before I started Hajj and that would’ve help me prepare better, or at least brace myself.

Free Food as You Arrive

Between Jeddah’s Airport and our arrival at the hotel, we received free food and/or beverages several times on the bus. Don’t store too much food from home in your bag if you want to keep what you don’t eat. Wasting good food is sinful, but it’s also hard to find someone willing to take it. The beggars on the street only want your money, not your food. In fact, I’ve seen what appeared to be perfectly fine food rotting in the streets of Mecca plenty of times. It’s really sad, but part of a larger global food waste problem.

Continue reading

Stuff You’ll Wish You Brought for Hajj

Hello Readers, I’ve just come back from Hajj, the yearly pilgrimage for Muslims and the following is a list of things that, should you ever go, you’ll be glad you brought along.

 

Extra Bed Sheets and Pillow Cases

The hotel we stayed at in Mecca was run-down, dirty and down right gross sometimes. I pray you don’t have the same experience that I do, but if you, you’ll be glad you brought extra bedsheets. I don’t know when the ones in my room were last washed and even the new “clean” ones they gave me smelled questionable to say the least. Using my own sheets at least gives me some peace of mind in that regard. If you don’t want the extra baggage, you could also probably buy some in the market. In addition to your hotel, they could prove useful at Mina and just praying in Jammat with a bunch of other people when prayer rugs aren’t available for everyone.

Continue reading

So, your garage door won’t close, eh?

We’ve been having problems with our garage door for a while now, where when we tried to close it, the door would come down all the way to the ground then suddenly pull right back up as if someone gave it the open command. This would go on and on and trying to close a garage door a dozen times in a row is understandably frustrating. If you’re in this situation, here’s a list of things we tried that finally (I hope) got it to close for good.

Continue reading

Tech Review: Toshiba Canvio Slim 500 GB External Hard-drive

My Rating: 4.5 out of 5 What is it? The Toshiba Canvio Slim is an external hard-drive that can be used for sharing files, storing photos or making a backup of an entire internal drive.

The Toshiba Canvio Slim External Hard Drive with included SATA to USB cable.

The Toshiba Canvio Slim External Hard Drive with included SATA to USB cable.

The Good One of the first things you’ll notice when you take this HDD out of the box is it’s superb aesthetic design. If it wasn’t for the fact that it was black and gray, I’d say it was Apple inspired. Continue reading

A Cool Project that Needs Your Support: HabitRPG

Habit RPG

In life, there are things we have to do and there are things that we want to do. Rarely do these two categories overlap and I (like many of you out there) wish there was a way to get both types done. We can make lists, deadlines or whatever to put these goals in front of us, but at the end of the day we just don’t have the motivation to get it done! That is where Tyler Renelle’s HabitRPG comes in.

Continue reading

Cool Theme Backgrounds #1

Check out the following small collection of cool Star Wars backgrounds. If you have any you’d like to suggest for the next post, leave a comment with the link and I’ll check it out for next time. Enjoy! (Please refresh if the images don’t load.)

My Top 5 Mistakes in Ubuntu

Ubuntu Logo

While I love using Ubuntu, I’ve made my share of (sometimes disastrous) mistakes while using it and wanted to share them so no one else falls down the same dark paths that I have walked.

5. Not using the Long Term Support (LTS) Versions

Each version of Ubuntu just keeps getting better and better, but sometimes upgrading to the latest version isn’t the best choice. If you don’t have a lot of patience (or a slow internet connection) this could be problematic as an upgrade could take several contiguous hours, which not everyone can spare. Then of course there are the problems upgrading from one version to another, such as certain programs not working correctly or packages being corrupted, etc. Avoid it all by just sticking to the LTS versions. You’re not missing anything important by playing it safe; rather, you’re saving yourself hours of headache because you’ll only need to update every 5 years instead of every 6 months.

4. Using the command line for something that could have been done through the GUI easily

Learning how to use the command line is important, but if you know your stuff already it’s better to just take the GUI route when you can. Why? The GUI is usually robust enough to avoid making the mistakes you’d make if you were allowed free access to the guts of your Linux distro. The Software Center already knows everything that is has to do, so there is no guess work and no need to cross your fingers. A single mis-typed character on the command line could send your entire computer into utter chaos and you’d never know why.

Continue reading