Code pondering – Number 1: Swapping two integers

Having done a fair few academic computer science courses and various coding jobs in a past-life I found that it was often thinking about the smallest code snippets carefully that you pick-up the raw building blocks for good, safe and efficient code. I haven’t written much code recently so have been brushing up my basics.

Compilers are now so good and computers so powerful that in practice you can write pretty terrible code and still make a perfectly performant and functional application.

One famous code problem is to swap two numbers without using an additional temporary variable. So you use only the memory already storing the numbers without requiring extra for the temporary variable. Consider…. Continue reading “Code pondering – Number 1: Swapping two integers”

When to start your tweets with a “@”! Why some people add a dot e.g. “.@rhbbse” to tweets

dottweet.pngThe quirk of twitter

To avoid personal chatter spreading and swamping others twitter put in a clever yet obscure feature to ensure those tweets you want to broadcast spread and one-on-one chatter dies a quick death in the twitterverse.

If you send a tweet starting with a handle i.e. an @ is the first character:

  • “@rhbbse you are awesome”

It will get seen in news streams by me and anyone who follows BOTH of us, “mutual friends”

If you want the world to know though you have to avoid the @ e.g.

By adding a “.” in front or some other text e.g. “Hey world” the tweet will go to all your followers and not just those that we share.

This also applies when retweeting others’ tweets which is why you often see a “.” added.

References

You can read more about this quirk here:

http://www.adrianjock.com/dot-in-front-of-twitter-handle/

“Now, you don’t punish anyone, Dutch or otherwise, for having big boobs.” – Women in IT

bse
I couldn’t really think of an image I wanted to use for this blog – so here’s a pretty picture of Bury St. Edmunds where it appears there are some women employed in IT!

“Now, you don’t punish anyone, Dutch or otherwise, for having big boobs.” is a famous quote from the UK Comedy “The Office”. In the UK this week there has been a “can sexy women work in IT” story in the news this week. Amazingly focused on a woman working in IT in my rural home town Bury St. Edmunds (which was one of the most surprising elements to the story – I thought I was the “only woman in IT in the village”!. The Office sketch is 15 year old and pre-dates the explosion in social media networking, the comical figure of David Brent discussing women’s bust size in the workplace actually seems to have come true. Continue reading ““Now, you don’t punish anyone, Dutch or otherwise, for having big boobs.” – Women in IT”

Blog at WordPress.com.

Up ↑