The random ramblings of a techie

October, 2012

Microsoft got cool? Apple is getting clobbered in the ad wars?

The new Iphone 5 has been out for some time now. The ads are back on the air – advertising the Iphone’s groundbreaking new features – the shape of the headphones! Who else but Apple would’ve thought that ear buds have to match the shape of the earlobe? And that you can use your thumb to  scroll your smart phone’s screen? Those are breathtaking innovations! I guess the 2% R&D budget is paying off…

For sure, the sales are through the roof, but Apple’s monopoly on cool is starting to slip. Samsung are clobbering them with their Samsung Galaxy S3 ads; the message is clear – the cool kids have moved on. Samsung is doing to Apple, what Apple did to Microsoft with the Mac vs PC commercials! And if Apple keeps pushing the same old products, it just might work!

Speaking of big old Microsoft – they got cool! I’m talking about the Surface table commercial that’s playing on TV. Snapping keyboards, lively, colorful, young people jumping around, dancing … The first few times I saw it, I didn’t even realize it’s a Microsoft commercial.

Whoever came up with that commercial has to be given an award. Compared to the weird and creepy Bill Gates & Seinfeld commercial, this one is an incredible improvement. I mean, who in their right mind will put Bill Gates in a commercial? Actually I know who – Apple.

I’m glad for them. Finally, 5 years after they introduced the multi-touch Surface table computer, Microsoft are doing something with the technology. The tablet look pretty good, but they have to get the cool factor working for them.

That’s extremely difficult. Microsoft is synonymous to uncool. They are not helping themselves either – copying everything from everyone, they’ve become target for ridicule  They even cloned Steve Jobs for the introduction of this very same Surface tablet!

I sure hope this new ad is a break with practice.

>>

, , , , ,

Google’s gtest not handling friend tests correctly

I was using Google’s gtest unit test framework today and I found an annoying problem – you can’t properly friend test methods that are in a different namespace than the class being tested.

Here is a typical situation:

namespace MyNamespace
{
   class MyClass
   {
      public:
         MyClass(int inData): data(inData){}
      private:
         int data;
   };
}//end namespace

namespace MyNamespace
{
namespace TEST
{
   class MyTestClassFixture
   {
      static const int fixtureData;
   }
   static const MyTestClassFixture::fixtureData = 5;

   TEST_F(MyTestClassFixture, TestEqual)
   {
      MyClass testClass(5);
      ASSERT_EQ(fixtureData, testClass.data);
   }
}
}

>>

, , , ,

Oracle C++ API non-sense

Parameterized statement throws invalid number SQLExceptions

I spent 2 hours trying to figure out this nonsense. Here is the problem:

Environment *env = Environment::createEnvironment();
Connection *conn = env->createConnection("username", "password",
connectionString);
string sqlQueryText = "UPDATE myTable SET field4 =:p4, field3 =:p3
WHERE field2 :=p2 AND field1 :=p1";
Statement* updateStatement = conn->createStatement(sqlQueryText);

updateStatement.setInt(1, field1Var);
updateStatement.setString(2, field2Var);
updateStatement.setInt(3, field3Var);
updateStatement.setString(4, field4Var);

updateStatement.executeUpdate(conn);

>>

, , ,