Sunday 10 November 2013

Accessibility

As I mentioned in my previous post, I've just been through Google's Accessibility course. Today, I found an introductory video to this course, explaining some of the thinking behind accessibility. It's an advert for the class, but it also shows some of the problems a person with visual impairments might have in visiting a website.

Google Developers Live: Accessibility MOOC

It sounds like they might be doing more courses in the future, including some thinking behind designing websites to be accessible. I do hope they do them.

Saturday 9 November 2013

Changes - A Busy Year

The Beginning Of the Year

It's been a very busy year and so I've had to put my voracious consumption of courses on hold. That doesn't mean I haven't been learning though! I spent most of the first half of the year writing grading scripts for a course which meant I gained a lot of practice in Python. It's amazing the difference a few comments from a colleague made in helping me improve. Another thing that helped a lot was sticking to code style rules which took a way a lot of the thinking about how to lay out the code, especially where to break lines.

Starting to Dream

During this time, I started to realise that what I really wanted to do was to code. Not just some of the time. All of the time. I looked longingly over at engineering, wishing I could be part of it but knew that couldn't be, afterall, what do I know? Just a bit a Python and not much at that. I started to read all the code reviews on github, trying to understand what was going on. I saw things that I knew I could do, just text changes, but that would be a start, right?

Problems...

There were two problems though.
  1. Github. I'd had a bad experience the summer before trying to get it set up. I didn't understand. I finally got stuff working but all I was aware of was that I could break stuff but I didn't know how. I didn't know what the UI was doing. It was all mysterious and I couldn't work out what was going on. Then things changed in how it was set up and I couldn't work out how to commit stuff to the right branch. The fear grew to the extent that I stopped trying to do anything.
  2. Getting the site running locally. That involved appengine and getting the site from github. Urgh...github.

Overcoming the Problems

Getting the site from github wasn't as bad as I thought it would be. Setting up appengine went remarkably smoothly. Getting all the things installed was 'interesting' and I managed to not get things working so needed help with that, but eventually it was all running. Yay! Now the time had come. I had the opportunity to make some text changes. Not worth an engineer's time really, and I could make those basic changes. Time to overcome the fear of github.

I was so scared! What if I pushed to the wrong branch? What if I broke everything? What if it did everything wrong? What if everyone got mad at me? I made my branch. Phew! I'd given up on the UI by now. It was too mysterious and doing things I didn't know about. All command line for me. I still didn't understand how anything worked, but I made my changes to the file.

A colleague made a comment that I shouldn't worry and that as long as I hadn't put in a pull request, nothing bad could happen. I panicked. I'd just typed "pull", so that must be a "pull request", right? What had I done? I was filled with horror. It took me a while to realise that this wasn't a pull request. Seriously, how can it be a request to github to pull but not be a pull request? What confusing terminology!

One advantage of working remotely is that no one sees the tears. Trying to overcome the fear of github was hard. Really hard. But thanks to my supportive colleagues, I made it.
The next part was the pull request itself. Had I messed anything up? Had I messed everything up? No, it was fine. Just a few things and it was all ok. My first 'code', albeit text changes and a bit of html, was live. That felt good. Soooo good.

Carrying On

During the summer, while I was helping user-test something a colleague had written when he made the comment that he'd be happy for me to work for him. Oh my goodness! If only...dream dream dream...doing something I want to do, working for someone I hold in high esteem, someone I can learn so much from...if only...if only...

An Exciting Suggestion

After a meeting, I was hanging out and chatting with a colleague when it came up that a certain tool would be useful for checking a student's exam submissions. He suggested I coded it, and in my naivety, I agreed. Boy, did I not know what I was letting myself in for. For the second time this year, I'd blindly decided to do something without having a clue what it involved. Well, I want to code so I'd better show I can do it, hadn't I? This felt like make-or-break time. Javascript? Well, I don't know anything about that but it's kind of like Python so it'll be ok, won't it?

Implementation

The logic required wasn't so hard, and it was adding stuff to an already created webpage so I could just build on what was already there. I wrote the code. It fetched the data from the server, made a nice list, joined the list and then displayed the results. Except it didn't. It displayed nothing. What the heck was going on? I put in some console logs. What? The list is empty? How can the list be empty. What is it doing? Why is it skipping stuff? What is going on? There are the web requests. They're working. The list is empty. I could not work out what was going on so in the end I had to ask for help. "Asynchronous web requests."

Mind blown

My mind was completely blown. I didn't even know asynchronous was a thing. My nice little ordered world had fallen apart. Everything I "knew" didn't work anymore. I was going to have to learn to think in a completely different way and fast. The exams were less than a week away. I recoded it. It kind of worked but it didn't seem like a good way to do it. It felt hacky, and it was. Then I found out about promises. I can't remember how. I don't think I knew that's what they were called then, I think it was just some way to write the code so it didn't execute until after the web request had returned. I found out that as the results come back, angularJS, the frame work we use, displays them one by one. I didn't need to make the list and then join the results, angular would take care of that. I still get a rush of childlike pleasure and excitement from seeing the page fill up bit by bit as the different pieces of information become available.

Pull Request

It took me quite a while with my finger hovering over the button to actually click and submit the pull request. I felt so vulnerable and exposed. Was it good enough or was it just going to be rejected as a load of unusable rubbish? Apparently it wasn't as bad as I thought it was. (I'm not convinced, and looking back, it's completely cringe-worthy.) It was such a good feeling to have the code out there and usable, only an internal page, but still, I managed to do it! I don't know if it made a difference or not to how things turned out for me, but in my mind, it was a turning point.

Every Opportunity

There's a typo? I'll fix it. There's something else needs updating? I'll do it. It had got to the point where nothing else was good enough. I wanted this so badly. All my free time was taken up reading, watching videos, trying things out. Learning and becoming familiar. Preparing for what I hoped might be. Then finally, the day came. It was suggested that I switch over. My dream was coming true!

Campus Party

Just before I switched over, I went to Campus Party UK. It was inspiring. I couldn't wait to get my hands dirty. There were two talks in particular which were particularly exciting. One by Daniel Knell on testing Javascript which gave me a clear overview of how testing works and what is available. He very generously spent about half an hour talking to me afterwards. The other talk was on git, by John Britton. That was followed by a relaxed group chat where John answered questions and gave out some github stickers. I have one on my kindle and the other on my laptop. Yay for github! As you've probably guessed, I'm not scared any more. Careful, yes. Scared, no. Git is an amazing tool, so powerful. I understand so much more about it now than I did before, but there is still a lot to learn.

The Switch

Mid-September it happened. I switched. Now my colleague that a few months back said he'd be happy for me to work for him is my tech lead. How lucky am I? It doesn't seem possible that I'm in the position I'm in now.

First Code Review

Now we're back to scary. Not that my code is bad, I know it is, but it's going to get better, but as to whether I'll be accepted. Will people be horrified and wonder why on earth I was allowed to switch? Will they wonder what I'm doing there? Will I be rejected? Will I be able to make the grade or will I be sent back? Please, don't send me back. I just could not take it. Imposter syndrome, anyone?

On the other hand though, I'm excited. Now I've got to write good code and not the horrible, embarrassing stuff I wrote before. It's going to get a thorough code review and I'm excited about that. What an opportunity! Ever since I took Udacity's CS101 a year and a half ago, I've longed for someone to look at my code. To rip it to pieces and tell me how to make it better. To be a perfectionist and know it's not perfect and have no idea how to make it better is so hard to deal with. Now I'm getting the feedback to enable me to make those improvements.

Onwards

So, I'm going to carry on learning as much as I can, contribute as much as I can, and enjoy the wonderful gift that I've been given in this opportunity.

Accessibility

I didn't actually intend to write this post. I just popped back here to share a link to something I discovered a couple of days ago. I came across 'aria-hide' in some code and didn't know what it was so I looked it up. While looking around the topic of accessibility (a topic I care about a lot), I found a Google course on web accessibility explaining simple ways in which a web site can be made more accessible. It's well worth the time it takes to go through it. Two useful plugins it mentions are a screen reader, chromeVox which works in chrome, so you can check how a website functions if you can't see it, and another plugin, Accessibility Developer Tools which checks how accessible a site is, including whether the colour contrast is good enough or not for people with reduced vision. For details of how to use these, see the first lesson in the course.

Some other useful links I found were on the alt attribute for img tags. I thought that having to have them meant they had to say something but having listened to a page read the alt and then the description next to it, I went looking to see how it should really be used. I found these two resources which throw some light on the subject. The blog post, HTML5 Accessibility: aria-hidden and role=”presentation”, discusses the problem of an image and headline linking to the same thing, and on the issue of how to tag images, I found this very helpful: WebAIM