Author: claresudbery

Travelling to India

Travelling to India

I recently travelled to India for work, and before I went I asked for advice, which of course I noted down in a big list, as is my habit.

I’ll be honest, altogether it felt like a big List of Things to Worry About and didn’t exactly relax me, but in the end I had a lovely time and everything was fine. 🙂

For what it’s worth I didn’t get ill. I didn’t eat any meat, ice or salad, I used bottled water to clean my teeth and I took strong probiotic pills twice a day. I can’t prove that any of that made any difference though.

Anyway, here it is.

Headline simple tips

  • Water is the main source of bacteria that could affect your gut (ie Delhi belly – normally diarrhoea, which can be very extreme indeed).
  • Only drink bottled water and check the seal. Some shops / street vendors refill bottles from the tap.
  • Avoid salad (because it’s washed in tap water)
  • Mosquito killer is pretty hard core – you set it off, leave the room for a few minutes, come back and they’re all dead – but if they’re really bothering you, this can be the most effective way of dealing with them in your room.
  • Don’t have ice – it’s made of unfiltered water.
  • You’re advised not to use your left hand to eat food, because this is seen as a filthy habit (left hand is used for the toilet, right hand for eating). But I never remembered this and wasn’t aware of anybody being disgusted by my eating habits.
  • Don’t open your mouth in the shower
  • Get up and walk around on plane, talk to staff, take shoes off
  • Only brush teeth with bottled water
  • Drink coconut juice from street vendors, but check how clean any knives used are, and carry your own straws around.
  • Best water brands: Bisleri, Kinley and Aquafina (in that order)
  • Good fruit drinks: nimbooz, mango frooti
  • Drink chai if cup is clean and water is boiled
  • You can’t take more than 25,000 Rupees into the country with you (a little under ÂŁ300). Make sure it’s the new denominations as banks won’t accept old.
  • Avoid meat.

Other Simple Tips

  • Taking spare pencils, pens and toiletries to give out goes down well if you want to directly give to children who are begging.
  • Be prepared: the disparity between rich and poor is unlike anything you’ve seen in your life.
  • Wear light linen or cotton or silk clothes, no unnatural fibres.
  • Carry a hand fan (electric or old-fashioned) at all times
  • Wear a wide-brimmed hat outside
  • Try and make sure you sleep in an air-conditioned room, at least
  • Take a container of alcohol-based hand cleaner, and use it several times a day.
  • Prepare yourself for lots of bureaucracy. The Indians love bureaucracy, thanks to English colonialism.
  • “Overnight flights suck.”
  • “Indian notes tear really easily so be careful with them in a zipped purse. If they’re even slightly damaged they won’t be accepted and even the bank may not accept them.”
  • Aim to use an ME3 airline – refers to the 3 big middle eastern airlines that clean up on long-haul services by routing everything through their hubs. Emirates, Qatar, and Etihad.

Detailed Tips

  • Useful site: https://www.asherfergusson.com/2012/10/6-tips-for-safe-drinking-water-in-india-a-tourists-perspective/
  • Understand the Indian head nod: https://www.youtube.com/watch?v=0RaBxH_MKQI
    • Summary:
    • Mid brow: “all right.”
    • Low brow: “I agree but I’m not convinced.”
    • High brow: “brilliant! Bring it on!”
    • The faster the nod, the more extreme.
  • “Probiotics are good to take before going to India, they boost up your gut bacteria. I took acidophilus Lactobacillus before I went and only had mild runs once.”
  • “Be prepared for the visual and sensual assault. The pollution is hardcore and its a v frenetic place.”
  • Avoiding jetlag: “If it’s daytime at your destination, try and stay awake with daylight or at least blue light in your eyes, eating when you would eat when you are there. If it’s night time at destination, don’t eat, close your eyes, try to sleep, but even if you don’t (I rarely do), just limiting the light coming in does wonders.”
  • “When eating communally with Indian colleagues, eat with your right hand. Most importantly, don’t pass anything or touch anything on a shared plate with your left hand. (I find it easier just to sit on my left hand for the first couple of days!)”
  • Surviving long-haul flights:
    • Seatguru.com is your friend – use it to work out which individual seats on each plane are most comfortable
      • “some are in awkward positions, or next to smelly loos or noisy baby basinets, or have media equipment boxes under the seat in front (massive bugbear if you’re tall) or will be constantly bumped by the food carts (big issue if you want to sleep).  The plane nerds have crowdsourced info on every seat for each route so it’s really useful.”
    • Take your own films on iPad (don’t assume you can charge on the plane though – a portable charger is a good idea).  
    • Take your own headphones.  
    • Check in early as you can online and bag the seat you want.  
      • But then also check the checkin screens when you arrive at the airport to see if there’s a seat with an empty next to you.
      • You can change your seat at last minute.  Either at the check in desk, or on the touch screen check ins.
      • A lot of airlines also have apps, which in addition to offering electronic boarding cards, will let you see a live seat map so that right up to the door of the plane you can change seats and hopefully avoid a dreaded middle seat!
  • “If you’re on Etihad you could listen to some of the expertly selected CDs hand picked by perhaps the most dashing audio producer this side of Doha or the AMAZINGLY mixed (if really cheesy) Dance program.“
    • [this from a friend of mine, who actually does this for his job!]
    • (or they also have quite a lot of movies.)
    • But take ipad too in case your screen is broken or their systems crash
  • “I’ve found travelling with a hoodie is a godsend as it can be super cosy, and provides a nice buffer between your head and the window (if you’re leaning against it) and can be pulled down over my eyes for shade and you can tuck your hands into the pockets so that if you fall asleep, they don’t randomly land in your neighbour’s lap.”
  • “As a white woman you will unfortunately get hassled a lot. It’s not uncommon to have men pinching your bum as you walk down the street.”
    • This never happened to me!
  • “No ice in anything ever (my 24 hours on the loo were from a fruit juice from a fancy place – where I forgot the no ice rule).”
  • “Prepare to have your privilege exposed like never before.”
  • “Professionally, no-one says no. Even when they should. If you are getting vague answers, don’t assume the best. Don’t assume someone will tell you bad news you need to hear.”
    • I found this not to be true.
  • “The water thing isn’t because all the water there is dirty. We don’t have the gut flora to cope with their normal bacteria.”
    • My Indian colleagues didn’t drink tap water either, so I’m not sure about this one.
  • It’s fine to take immodium if you have the runs: “it’s a common misconception that it stops the movement, and therefore by taking it you are keeping all the nastiness in.”: http://www.netdoctor.co.uk/conditions/digestive-health/a27690/11-common-digestion-myths-debunked/
  • “hotels with restaurants are often the best source of Delhi belly, because they have large freezers & when they suffer power cuts (which in some places happens a lot) their food defrosts & refreezes, thus making people sick.”
  • “Directions – if you ask someone on the street for directions or if you ask someone at a bus terminal where you get the bus you need for XXX they will tell you. It won’t always be right. Indians think it’s ruder to say “I don’t know” then tell you something wrong.”
  • “If you want to go on day trips out of the city, hire a driver for the day. They’ll stay in the cab while you go sight seeing and it costs @*&^!? all. Like ÂŁ20 for a day. Just be nice & buy them a drink of fanta if you’re getting one. I imagine if you  hire one from via the hotel it’ll be a lot more than walking down the road to a taxi rank and asking there.”
  • “If you go sightseeing somewhere like the Taj Mahal (although they may do it more ordered there – but it’s India so unlikely) you’ll be mobbed by tour guides offering you tours. It’s really easy to get pissed off and turn them down cos it can be a bit stressy & also cos it’s easy to be suspicious of everyone and assume they’re all on the make. The tour guides are actually really knowledgeable & know all sorts of stuff you don’t get in the little guide books.”
  • “You might also find you get stared at. It bugged the hell out of me until I realised that Indians don’t have a culture of don’t stare. And as soon as I smiled at someone staring they’d smile back. And quite often wave.”
  • “Don’t expect food to come quickly. It might, but don’t expect it. They do work on Indian time. I mean it’s hot, so why rush?”
  • “You can buy any prescription drug you want from a pharmacy without a prescription. Pharmacies do also sell knock offs.”
  • “Carry small denomination notes to give to beggars”
    • …but some people say, give out pens and pencils instead.
  • “Take bag space for bringing stuff back. you’ll want all the fabrics and knicknacks.  maybe that’s just me.”
  • “You’ll probably have AC but the best trick I found in the hottest place I stayed was to have a shower in my pajamas & then lie on my bed with the ceiling fan on high. It was only one night but I think I woke up three times stone dry & boiling hot.”
  • “Apparently men come back thinner and women come back fatter after a trip to India. Men clearly have weak stomachs. Bunch of pussies.”
    • LOL
  • “You absolutely must do Taj Mahal if you can, ideally get there for sunrise – it’s totally worth the early start!  Nothing prepares you for how beautiful it is IRL, even though you think you’ve seen it a million times.”
  • Re jet lag: “it’s always harder going east than west”
  • “Two weeks of air pollution is fine. If it’s a bit dusty as well you might want to take a light scarf that you can pull up around your mouth and nose. Also faces masks do @*&^!? all for pollution they really just stop dirt particles getting in, which you cough up anyway eventually.”
    • Not sure that’s actually true, I’ve seen some articles suggesting face masks really do make a difference… but also others that suggest they make very little difference.
  • “I was a bit “meh” before I went to India. But when I got there, I was “f*cking hell, wow !” It’s just a mad, crazy place. Every day there, you witness things that are so massively different to life in the UK : the contrasts between opulent wealth and extreme poverty (way bigger than anything I have seen in the UK)……the crazyness of Delhi rush hour white knuckle ride…..the touristy stuff was excellent (I went to Taj Mahal / Agra temple, and also the ginormous Hindu temple on the eastern side of Delhi – which is well worth a visit)….the wildlife, the architecture…..etc etc. Some of the poverty stuff was quite upsetting – seeing leprosy sufferers begging at the traffic lights was a real eye-opener. But when I was there, I was treated incredibly well by my Indian hosts. It’s just a really intense and full-on place. It’s exhausting being there, but exhilarating too.”
  • “We went to a few places where they make stuff as part of our tour and I loved seeing how the handicrafts are still being practiced such as inlaying wood and marble with precious stones or wood-block printing fabrics or weaving silk for saris. I know it’s a dying art – as it is everywhere in the world – but it’s very satisfying watching a skilled craftsperson at work. And the fabrics! Omg i could have bought it all! Such beautiful cloth with gorgeous patterns and colours.”
  • “podcasts, hoodie, in-ear buds (which work nicely for noise mitigation with podcast on softly) plus a decent amount of booze and popping 10mg of melatonin – that’s usually me sorted for a longish (i.e. 5+ hours) flight.”
  • “don’t feel like you have to keep your shoes on (but do wear clean socks, obvs), and do take a walk now and again if you’re uncomfortable.  I often hang out at the back of the airplane and chat to the stewards, particularly on night flights when they don’t have much to do.”
  • From an Indian colleague of mine from Delhi: “lots of places to see …
    • Qutub Minar, Jama Masjid and Red Fort are my favourites
    • you can very easily  and cheaply rent a car with a driver for a day
    • Leave early morning though … As early as possible … Otherwise there are too many queues
    • Taj Mahal is best at dawn … It opens at 9 though … So you can plan to be there then …
    • And do get a guide … But only the official ones with a badge … Plus they tell nice stories ?”
    • “there is a smog these days in Delhi … get a mask if you are bothered by it … Masks are easily available at any medicine shop
    • Office & shops be okay though … It’s all temperature controlled hence sealed”
    • “If they try to put you up in a guest house …  Say no ? … They are not good”
    • “u can take uber everywhere because it’s ridiculously cheap.”

 

Normalised and Denormalised (aka Denormalized)

Normalised and Denormalised (aka Denormalized)

(Picture from The Illusion of Normal: https://everydayaspergers.com/2012/03/19/day-50-the-illusion-of-normal/)

As always, do please correct me if I’ve got anything wrong.

tl;dr: Normalise = make it look normal = separate fields out into separate “normal” entities like Customer / Address, which then link to one another via foreign keys.

In relational databases: A normalised database is one where every possible entity has its own table, typically with an Id column, which other tables will reference using foreign keys. “Normalisation” refers to the fact that each entity has been separated out into its own table, with the links between entities being upheld via Ids and foreign keys. Each separate piece of data exists only once, and can be accessed by navigating a series of relationships.

For instance you might have Address, Customer, Employee, Invoice, etc. A customer may have a Sales Rep which links to the Employee table via EmployeeId. Meanwhile, the invoice links to the customer via CustomerId, and the customer links to an address via AddressId.

Denormalisation is the process of reducing joins in queries, by adding some redundant and duplicate data to tables. A denormalised database has some duplicated or redundant data. But it means that your queries will have fewer joins. Joins are costly.

Two examples of denormalisation:

1. In the above example, in order to get from Invoice to Sales Rep you have to go via customer, to get the employee Id of the sales rep. Instead, you could duplicate the SalesRepId in the Invoice table.

2. You may want a snapshot of the customer name and address, as they were when the invoice was created (they may have changed since then). If the invoice only accesses name and address via a link to the customer table, you can’t recreate the invoice as it was when it was first sent out. The solution is to copy customer name and address into the Invoice table.

Context:

I worked with relational databases via SQL for many years, but as is often the case with binary terms, I frequently forgot which was which out of “normalised” and “denormalised”, and what exactly they meant.

I’m currently learning about graph databases via Neo4J, and the term “denormalise” came up, and I had to remind myself – yet again – what it meant.

This time though, I wrote it down. Therefore I’m hoping it’ll stick.

 

Projecting Slides on a Mac

Projecting Slides on a Mac

I’ve had a Mac at work for a year now, but I’m still a Windows girl at heart: I’ve only just learnt how to project slides to an external screen from my Mac. It’s useful info, so I’m recording it here.

Unlike Windows (where it’s just Windows key + P), there’s no simple keystroke for this.

Project to an External Display from a Mac:

!! This functionality is only available when you have an external display connected !!

    • Apple icon (top left) | System preferences | Displays (top left, second row down).
    • Click the Arrangement tab (it won’t be there unless you have a cable connecting your laptop to another display).
    • Uncheck Mirror Displays.
      • The good news is that this setting will be remembered, so unless you change it back again (for instance when pairing), it will still be set that way the next time you connect an external display.
    • If you want, arrange the displays so that the extra display is to the left / right of your laptop (to match the actual setup – this can be helpful if you want to drag things between the two screens).
    • This will extend your desktop to two screens, one of which will project to a connected external display, and one of which will be your laptop screen.
    • Then you just make sure your slides are on the projected screen, and your speaker notes are on your laptop.
    • More here: https://support.apple.com/en-gb/HT202351

Display Slides in Presenter View:

Powerpoint:

  • Slide Show | Play from start (or whatever)
  • Hover over the bottom left of the screen while slides are being shown.
  • Click the icon that looks like lines of text on a page
  • Select Use Presenter View

Google Slides:

  • When not in presenter view, there is a Present menu, top right
  • This has a presenter view option – which will open a new tab in the browser with a Speaker Notes header.
  • Click on Speaker Notes, then just separate that browser tab onto your external screen.

Keynote:

  • If you have an external display connected to a Mac, then Keynote will automatically display slides on the external display and show presenter view on your screen (but not necessarily speaker notes – see below).
  • To add speaker notes while editing slides, choose View | Show presenter notes
  • To see speaker notes when presenting (only works when connected to an external display), hover over your screen to see this icon, top right:
    • Screen Shot 2017-11-13 at 12.36.56
  • Click on that icon and it will give you a bewildering array of choices… find the Presenter Notes checkbox, bottom left, and click that. You can also move components around and resize them to look however you want.
  • More here: https://support.apple.com/kb/PH16965?locale=en_GB
Beating Writers’ Block

Beating Writers’ Block

I found this one tip hugely useful when I was writing novels:

Assume that your first draft will be crap.

It helps to know that even professional writers produce crap on their first attempt. It’s allowed to be crap. You can even sort of aim for it to be crap. It’s really really important to suspend your inner critic at the first draft stage. Your inner critic is your worst enemy at that point: your inner critic is a cruel malicious bully who you would never allow anywhere near anybody you loved.

But without that first draft, you have nothing. So: allow yourself to write utter nonsense, because no matter how crap it is, it is content. It is raw material. And you really badly need that raw material in order to proceed.

Once you have the raw material, invite your inner critic back to the party. Now you can edit and craft and hone.

Oh yes, and here’s a sub-item which I guess I learnt so long ago, I’d forgotten about it: Editing your own work is not as bad as you think.

When I was at school writing essays, I only ever wrote one draft and handed it straight in. This was because I couldn’t bear to read my own work back to myself – I always hated it. But then I realised that it was really satisfying to edit my own work, and it meant I could make it a lot better.

So, use the “rubbish first draft” to get you past that first I-don’t-want-to-do-it hurdle, because you are giving yourself permission to produce utter dross. And it doesn’t matter, because you’re going to go back and improve it – which is a really satisfying process.

Hack Manchester 2017: The Challenges

Hack Manchester 2017: The Challenges

I couldn’t find anywhere all the challenges / prizes were listed together, so I’m putting them all on one page for easy comparison.

Follow the links to find out about the sponsors and see more detail / explanation about the challenges:

WebApp UK: Best in Show.

MediaBurst: “Use SMS to help save lives.”

Dunnhumby: “Use technology to enhance the retail experience for a customer in the home or in store.

Ombudsman Services: “Create something that will make a consumer even angrier when registering a complaint.

GCHQ: “Develop a new way to send information to the emergency services.

Carbon Co-op: “Create an energy monitor which would be suitable for a visually impaired user.

Co-op: “Design an app, game, website or other digital service that re-connects people who’ve lost someone with other people and things to do in the places they live.

Texecom: “Use our network of wireless sensors to show us something interesting about the behaviour of people at Manchester Science Festival and the Texecom head office.

Advice for women (or anyone!) starting a career in tech

Advice for women (or anyone!) starting a career in tech

(a series of tweets originally sent to @ArrieLay and stored here for posterity…)

Fake it til you make it. Always act like you know what you’re doing, cos You DO – You’re being imperfect, just like everyone else.

Pay attention to people. Focus on empathy. Learn to pair. Learn to collaborate. Celebrate and enable your fellow team members.

Always come to work as yourself. Don’t be afraid to show vulnerabilities, and give others space to show theirs too.

Take risks. Relish your uncomfort zone.

Remember that EVERYBODY feels insecure about their knowledge levels. It’s impossible to know everything, and everybody thinks they are disadvantaged because others know more than them.

Learn to embrace your knowledge gaps. See them as exciting opportunities to learn more. Never be ashamed of them.

Have a questioning attitude, be open about your excitement about learning more. People respond well to it and will help you learn.

Question everything.

Love people. Even the annoying ones. People are great. People are useful. People will help you, whether they mean to or not. 🙂

And for the older amongst us… Age is an advantage, not a curse. Find the wisdom you forgot you had. Age is money in the bank.

Here are some links to some helpful resources for women (or anyone) arriving at or returning to careers in tech: https://insimpleterms.blog/2017/10/13/resources-for-women-arriving-at-or-returning-to-it/

Resources for Women (and Everyone Else) Arriving at or Returning to IT

Resources for Women (and Everyone Else) Arriving at or Returning to IT

Just a bunch of links really, but hopefully useful (scroll down to the end for a bunch of really useful online resources for people learning to code)…

Women returners:

Black females:

  • https://codingblackfemales.com/

Mums in technology: 

Tech Mums: 

Equate Scotland: 

13 places where women can learn to code: https://learntocodewith.me/posts/13-places-women-learn-code/

Code First Girls: https://codefirstgirls.typeform.com/to/ks4bsj

Code First Girls professional courses: http://www.codefirstgirls.org.uk/female-professionals.html

Offline resources:

 

CSS Specificity

CSS Specificity

Specificity is what you use to determine which bit of styling will “win” when there are conflicts. It’s all about how specific your styling is in defining what elements it should be applied to.

There are five different levels of specificity, with most important at the top:

  • !important
    • Wherever this is, it wins
    • It’s BAD. Avoid. It makes a mockery of any other css rules, and makes your css v hard to read / debug.
  • Inline styling
    • (use of the Style=”” attribute within an html element)
  • Id selector
    • !! Remember, this means that your html element has an Id, and you are writing styling which will only apply to that one html element with its own unique Id
      • This means your css will not be reusable!
    • Class, pseudo-class or attribute selector
    • Element or pseudo-element selector
  • So, if there is some styling which uses a level higher up the tree, it will win
  • If there are two pieces of styling at the same level, this is how you decide which will win:
    • Whichever one uses the most selectors at that level will win
    • So, div > ul > li > p will beat div > p
    • If they use the same number, then the one defined most recently (eg lower in the file) will win
  • Notes:
    • css-tricks.com uses a numbering system to represent the above levels, eg (0,1,0,3,0)
    • The universal selector (*) has no specificity value (0,0,0,0,0)
    • Pseudo-elements (e.g. :first-line) get 0,0,0,0,1 unlike their psuedo-class brethren which get 0,0,0,1,0
    • The pseudo-class :not() adds no specificity by itself, only what’s inside it’s parentheses.
    • The !important value appended a CSS property value is an automatic win. It overrides even inline styles from the markup. The only way an !important value can be overridden is with another !important rule declared later in the CSS and with equal or great specificity value otherwise. You could think of it as adding 1,0,0,0,0 to the specificity value.

More here (this was where I made these notes from): http://css-tricks.com/specifics-on-css-specificity/

Also more here: http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/

Want to learn Git / improve your Git knowledge?

Want to learn Git / improve your Git knowledge?

This list is culled from a thread where people were asking for useful resources when learning Git. A lot of useful recommendations were made, so I’m summarising them here (for my own benefit as much as anything):

I ran a git workshop for some devs earlier this year – I created a repo, a bunch of exercises and some top tips. Everything you need to find your way around should be in the readme: https://github.com/claresudbery/Git-Playground

I find it very helpful to understand what the definition of a branch is: it’s just a commit, which defines the current head of the branch …and that allows you to explain the concept of “detached head”.

I would also encourage people to dig a little into the gitconfig folder and understand what diffs and commit IDs are all about.