Blog do Eduardo Costa Meu blog pessoal


Our Solar System

Kudos, NASA. I'm already a big fan of Astronomy Picture of the Day, main source of all my wallpapers. I was looking for a Milky Way picture when I found Eyes on the Solar System. It's the most gorgeous and perfect thing that current technology can provide to the masses, like me.

After installing a plugin, you gain access to an amazing database provided by NASA. It contains the exact position and speed of all planets, satellites, comets, all in real-scale 3D models! Just perfect! I spent a couple of hours traveling in our solar system. The proportions of the planets and their orbits is not even close to what you see in the books.

First example. When we think about the planet's orbits, we learn that they are something like this:

Just take a look at the real stuff:

Our Earth vanished! Jupiter, the giant, is now a little dot, visible only because of that unnatural glow! What about its orbit? Compare it to its neighbors, Mars and Saturn! Now, that first drawing seems to came out of kindergarden!

And our planet and its moon? We always have the feel that it's "in the next block"! This GIF tells what we usually think:

Oh, the humanity! They would collapse if this is the real proportion! Let's play "where's Waldo" (or "where's Wally/Charlie/Willy/etc"). Try to find our blue marble in this picture, taken behind the moon:

This huge water ball we live became a little circle when we are in the dark side of the moon. And what about the craters of its surface! I knew that there was a lot, but the texture of moon's surface is really something!

And what about the light speed? Using EotSS's "fast forward", I adjusted the speed to travel at light speed, but everything was almost stall! No "flashing stars" like Star Trek! The fastest possible speed in our know Universe and I got an still image with dot-planets approaching really slow! Is it cool or what?

Two more things to consider. Phobos and Deimos, Mars' moons, are not round like our moon! They look more like beans! And Mercury, our hot friend near the Sun, is not red like the books in my school. It's grey and textured, just like our moon! BTW, the view of the Sun from Mercury is the same as we have here: just a small, yellow ball in the sky. The colossal distance between Mercury and Earth is still small compared to the distance of the Sun! And, even this is the line between life and burning death!

Last note. This is the view of Voyager 2 at the exact date and time I was born:

Filed under: geek 2 Comments

Vanilla unit testing in iOS

I guess I finally understood how to make unit testing for iOS using XCode 4. I'm used to the simple and pratical JUnit+NetBeans combo (sometimes "+Maven"), but I got no luck googling it.

There's a nice way to make vanilla tests. Add a new "testing bundle" target to your project. Make sure it don't have dependencies to the main project. Add any class you need for the test to the "target sources". Create your test classes and mocks for the non-tested classes. This way, you can create suites for testing specific classes/features by using mocks for non-related classes - and without using any mock frameworks.

Now, edit the scheme for the main target. Put your test targets into the "test" configuration. After this, you can run all tests (⌘-U) while working on your main target!

Filed under: programação 2 Comments

Mercurial 1, Subversion/CVS 0

That should work on GIT, too. I made a big mistake today. I'm working on a pet-project for iOS, and, after a few weeks, I decided to push the Mercurial changes to my personal server. I created the remote repo, but the "push" was made into another repo (my CuteGod for iOS). Darn you, MacHg! I could use a "that repo is not empty" message!

It was ruined: CuteGod revisions where "squished" below the new project. Ugly to see, worst to recover. My backup was outdated - specially for other projects I was working. What to do?

After some evil sites telling me that I need to "hg revert" or "hg backout", I simply remembered: "this is a distributed repo"! I have a complete, updated backup with my working copy! It was a matter of deleting the trashed repo, creating a new one and making an "hg push". Simple as that.

That simple move is impossible to make with centralized repos, like SVN or CVS!

Filed under: opensource No Comments

Osama bin Laden died?!?

So, it finally happened. The biggest american enemy is dead. Killed in a movie-like operation, with badass commandos jumping from helicopters, headshots, woman shields and all that cool stuff. Kudos, Barack Obama!

From what I remember, Osama bin Laden was the only "anti-Christ candidate" that got his a** kicked in a big freaking mansion! No bunkers, caves or such! A million-dollar mansion! And the funny fact is that he got caught because of his greed: his "house" was six time bigger than any other house in region, with tall walls, and no telephone or Internet (really fishy for somebody so rich, isn't it?):

Another thing to congratulate Barack Obama was the idea of a islam funeral. Osama was a big scum, but was very wise to respect their culture - this prevents any religious-driven attacks.

Filed under: sandbox No Comments