SHR vs. SAR

It came up in an interview today when SAR (shift arithmetic right) is used instead of SHR (shift and rotate right) the simple rule (on gcc at least and probably cl) if it’s a signed it will use SAR and not SHR. Makes total sense of course after looking at it. Left shift is always SHL regardless of sign.

int a = 0x80000000;
int b = 0x00000001;
a = a >> 5;
b = b << 5;

Produces:

movl   $0x80000000,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
sarl   $0x5,-0x4(%rbp)
shll   $0x5,-0x8(%rbp)

After shifting the variable will be: 0xfc000000

This sometimes surprises some people who assume that shifting is always the rotate shift operation (that shifts in zeros)

WikiBooks Shift and Rotate

Posted in interviewing | Tagged , , , | Leave a comment

Artshow SVG

I’m happy at how artshow is coming along. It feels ‘done’ and as a learning tool has been the perfect scope of project. I think if I would have done something more ambitious it would have been more difficult to bring it to completion (like the majority of my projects in svn).

Here’s the way it’s setup:

  • Simple PHP page that queries the wordpress database for the wp_postmetadata for images matching a certain prefix and returns the wierd WP formatted metadata via an AJAX JSON query.
  • The main frame is basically a single div to bind to raphaeljs
  • The image metadata is parsed and put into a local js object cache and the SVG is built-up using the raphael js API.
  • The UI is all javascript driven using the animation framework in raphael

You can play with it and see the code here:

http://xenopod.net/artshow.html

Art is by Joe Peterson.

It works on the iPhone/iPad as it is fully web compliant. Much thanks to the Jquery and RaphaelJS libraries for covering me on the front. I really don’t want to bother with browser compatibility.

Posted in javascript | Leave a comment

Types of Twitter Conversations

  • Personal Narrative

I’m writing to myself.

  • Banter

We are writing back and forth @eachother

  • Commercial

Old Spice, etc

  • Meglomaniac

CHECK ME OUT!!11

  • Broadcast

#throwoutanidea

Posted in uncategorized | Tagged , | Leave a comment

Social Harvesters

I’ve noticed this trend lately with a few people that I know casually and are linked to my Facebook profile. It’s something I’ll call Social Harvesting since it’s not unique to FB but could also apply to Twitter, Netlog, etc.

The basic idea is that the harvester is so hooked into their social network and the positive mental tingles they get from that feedback loop that they will harvest every possible ounce of their life onto their social network as possible in a given day. For example if a harvester goes to a party their primary activity is not to meet interesting people or engage in conversation as much as it is to harvest pictures and facebook friends from the party that they can then use to feel better about themselves. You can observe this behavior by watching the account of someone you might know in real life. If every activity you observe is followed with an image upload to facebook or a tweet about ‘brushing teeth’ there’s a good chance you’ve met a social harvester.

These people are become extremely annoying to hang out with as they are constantly proposing inappropriate or boring photo-ops and then immediately tagging, broadcasting and posting on these boring events. They will often take pictures of themselves next to fancy cars or in the “coolest” place they can find even if they are just driving by to increase their perceived visibility and coolness among their friends.

I don’t have a lot of conclusions about what this does to these people except that my gut is that it makes their actual life a lot less interesting and probably points to some kind of insecurity or lack of accomplishment in the realm of reality. I think this behavior also cheapens real friendships and removes focus from actually getting real things done.

I love reading about what family and friends are up especially when people are actually doing cool stuff but there’s a line there and I think it’s easy to get carried away. If the number one thought that pops in your head when you’re somewhere is to post about it facebook or twitter I recommend that you take a short break and cherish some time with friends without turning it into a social media post.

Facebook Reality Check

Posted in uncategorized | Tagged , , | Leave a comment

Some Web Programming

I’ve been learning some more web programming, something that I’ve traditionally stayed partially removed from. I’m building a SVG based image gallery for a friend (http://xenopod.net). I’ve already done two rewrites as I’ve been learning how not to write javascript. So far I’ve been primarily using RaphaelJS and JQuery. I’m hoping to have a version up that I can be happy with soon.

Posted in uncategorized | Tagged | Leave a comment

Hi Hello

This is a test

Posted in uncategorized | Leave a comment

New Tracks

I put up some new tracks. Download links are embedded in the player.

PROJ::ECHTS – Robo Brazi Domo (VLZ12 Mix) by R3C + T

PROJ::ECHTS – I Said, She Said (2nd Analog Mix) by R3C + T

Posted in uncategorized | Tagged | Leave a comment

Promoted

I’ve been learning SC2 with the help of the guys at work and have been slowing improving my skills. I finally got out of the bottom division! woot feels good, such a good matchmaking implementation :)

Posted in uncategorized | Tagged | Leave a comment

How to Deal with Apple Repair

So I finally got my computer back to functioning. The speaker and optical drive are now repaired. The screen is still not 100% but whatever I’m just don’t have the energy to deal with them any more. So here’s my main piece of advice for people taking their machines into the Apple retail outlets for repair.

Do not sign anything until you have completely inspected the machine yourself.

Yeah it’s a pain, and they’ll probably try and get you to sign off on the repair without inspecting it. Bring a disc, your iPod or whatever it is you do with your machine and just do it right there. Have them leave you at the counter while you run your machine through it’s paces. If your experience is anything like mine you have a very high probability of finding a flaw in the repair.

Posted in uncategorized | Tagged | Leave a comment

Apple Repair Verdict: Complete Suck

I recently bought a 17″ MacBook Pro to use a primary workstation for audio, programming etc. Soon after I completely abandoned any plans for releasing iPhone or iPad software because of Apple’s completely unacceptable TOS for iPhone developers. A few months later the shiny new Mac completely stopped functioning.

So there I was with a completely busted laptop. I wasn’t too worried, I had bought an Apple Care plan and figured the repair would be covered. I made my first appointment with their “Geniuses” (another example of Apple totally over-selling themselves) over the phone and took my machine in a few days later. According to online reviews not all Apple stores are good for repairs, some such as the Irvine Spectrum look down on broken machines and don’t provide good service. I took mine to South Coast Plaza in Costa Mesa. After waiting in line for fifteen minutes for an appointment I booked days in advance they prepare the bad news for me. After touching the power button to no avail my friendly “Genius” tells me that it’s being shipped off for repair, that my data is probably not going to make it. Fortunately I can get my data off the machine but it will be “VERY” expensive and Apple wont’ do it. Thanks dude, I tell him to screw it, I’m prepared to lose 6 months of music, my code is backed up in source control – I’m an idiot for not taking better backups.

So a week later my laptop is back in the Apple store good as new, or so they tell me. Guy hands me my laptop and prepares to send me off but I insist on testing it first. Sure enough the bottom part of the screen is covered in a tiger stripe pattern. Lovely quality control guys. “Oh you can fix that by resetting the PRAM” says the Genius. Mmmhmm. No that’s not going to work, at all. “Well you’re going to have to make another appointment to get a repair” he tells me. I’m certainly not happy by this point. I have two small children with me and am not looking forward to spending 3 hours in a mall just to talk to another Genius so they can take back the laptop that they couldn’t fix right the first time.

Next meeting with a Genius 3 hours later. I’m told that the laptop will be on rush that I should get it back in days because they are fixing it in-house. That promise came and went a few times as the rush repair stretched out to another 5 days. I drive back in to get my laptop and everything looks good. So I take it home. Big mistake, I really should have learned the first time that Apple repair has little to no quality control. The optical drive is not functioning and I have one functioning speaker.

So here I am finally mad enough to write a post about it. I used to be a fan, I spent a lot of time as a kid cutting my programming teeth on the Apple Classic, IIgs and IIci but I think Apple has really lost it. Not only have they lost my heart as a developer they’ve now lost my confidence as a consumer.

Apple I’m over you.

Posted in uncategorized | Tagged | Leave a comment