Tuesday, 16 August 2016

Why would you not differentiate member variables?

Another post from the llvm mailing list, this time on the topic of member variable naming conventions.

I remember hacking away on some llvm code and having a terrible time with this. It can also lead into dangerous ambiguities when you use local variables that actually hide member variables. The whole naming convention they use is insane. I wonder if they use any static analysis tools?

Thursday, 11 August 2016

Holacracy

Someone pointed me to this article on Holacracy which is an interesting approach to organisation. You effectively form 'circles' of people who are focused on an area and it is composed of diverse sets of people. You are on multiple circles at once and move around. Seems like an interesting idea but a little anarchic.

Tuesday, 9 August 2016

Internals of Firefox Threading

Interesting post on the internals of firefox's new multithreading 

Mega repo or microrepos? Llvm-dev take

There is an interesting discussion going on at the llvm-dev mailing list as to whether to split their massive svn repo into multiple smaller repositories with git.

http://lists.llvm.org/pipermail/llvm-dev/2016-July/103097.html

I have come across the problem so many time and the issue ultimately boils down to workflow: tools really don't support this. I want to build the modules individually and then sometimes for integration all together. If there is a dependency between repositories I sometimes need to express it.

Surely there is a better way.

Wednesday, 22 June 2016

Short Term Apartment Hunting in NY

I recently found myself searching for short term apartments in New York City. This was surprisingly difficult so I thought I would list some of the resources I found that met my constraints.

I wanted a furnished place for a maximum six months. I have no credit history (my first time here), no guarantor (I have no family here and wanted to avoid relying on friends). Finally, I wanted to be somewhere between the East Village and 60th Street in Manhattan or Williamsburg.

Without further ado, here are the websites that showed most promise:

  • https://www.homeaway.com/ - like Airbnb but longer term and thus slightly cheaper.
  • https://www.roomorama.com/ - same as above.
  • http://streeteasy.com/ - dedicated to NYC but very hit and miss. Involves contacting realtors through the 'Contact' button which invariably leads to tedious email chains trying to arrange viewings etc. There are some 'No Fee' listings that are from directly from building management companies but these are few and far between.  
If you are really scraping the barrel, there is zillow and airbnb but both of these seemed either to have poor filtering (couldn't find furnished stuff on zillow) or expensive.
None of the usual longer term websites like zillow and streeteasy allow you to filter down to short term listings only with much reliability which makes life hard. Most email exchanges were 'Is this available for a six month lease?' to which you get 'No' or 'Yes, starting 2 months from now'. I needed to move in within a month.

Finally there is also http://www.nycityapartment.com/ which seemed to have promising stuff and specialised on short term leases. Good if you are really at your last tether. The prices were good and the realtor was nice but the places I looked at weren't particularly appealing - perhaps you could make them your home with a little TLC.

Monday, 16 May 2016

DIY Refit Hansgrohe Plug

One of the worst errors any proud Hansgrohe owner (a 'groher) can make is to attempt to dismantle their sink plug.
http://www.bathroomspareparts.co.uk/ekmps/shops/ebaths2/images/hansgrohe-pop-up-plug-for-basin-bidet-96026000-15890-p.jpg
Fig 1.0 'grohe mechanism







Per fig 1.0, the plug mechanism is fairly involved. The bottom-most ring (low-ring) seen in fig 1.0 is to be inserted on a protruding 'prong' that is attached to a long arm for raising and lowering the plug to block the plug hole.

If the low-ring is disconnected from the prong then you're in trouble as you have to reconnect it to get a functioning sink plug.
If you have managed to drop any components for this process down the sink (by attempting to unscrew the silver top of the plug, for example), then you will need to buy something like a PUP pickup claw.

Once you have retrieved all the components that are part of the mechanism, you can begin to reassemble using our custom procedure below.

Components

Fig 2.0 Components laid out
Figure 2.0 shows the salient components for this procedure. From left to right: low-ring spike, mid-section and top-lid. Along the bottom sits a common kitchen straw which we'll use later to assemble the plug.

Step 1

If you have small hands you should be able to reattach the low-ring to the spike protruding from the sink inside the plug-hole. To do this, you need to disassemble everything as shown in Fig 2.0. Attaching the low-ring can be a risky operation so you might want to loop a small piece of thread through the low-ring so that you can hold onto it and attempt to reattach it without fear of losing it into the sink and having to retrieve it (as explained earlier).

Step 2

Now you want to reattach the mid-section to the low-ring spike without dropping the low-ring spike down the sink and ruining your hard work. However, you can't really hold onto the low-ring spike while it is attached to the prong as then you haven't got space to put the mid-section on. This is where the drinking straw comes in.
Fig 3.0 Straw usage



Place the drinking straw on top of the low-ring spike (hopefully your drinking straw is the same diameter as mine which was helpfully the right width to fit on top of the spike).

Step 3 

Using the straw you can maintain the position of the spike while lowering the mid-section down the straw. Fig 3.0 attempts to demonstrate this.
Slide the mid-section all the way down to the bottom of the straw and onto the spike. You should then be able to remove the straw and the width of the mid-section will hold the construction in place.

Step 4

Attach the top-section to the mid-section by placing it on top. Simply rotate the top-section to tighten the whole construction.

And there you have it. Now sit back and admire the rare earthly delight that is a fully-functioning 'grohe!



Saturday, 3 May 2014

Skype Humming on Ubuntu

When you log into skype sometimes it hums after it plays sounds on Ubuntu Linux, most likely because it was written by Microsoft.

Anyway, this can often be solved by running skype as:

PULSE_LATENCY_MSEC=60 skype %U


which does something magic to PulseAudio.

Can we just autofill city and state? Please!

Coming from a country that is not the US where zip/postal codes are hyper specific, it always drives me nuts when you are filling in a form ...