<![CDATA[Yosuf]]>https://yosuf.dev/https://yosuf.dev/favicon.pngYosufhttps://yosuf.dev/Ghost 5.2Mon, 08 Aug 2022 23:19:17 GMT60<![CDATA[ELK data ingestion options]]>

When it comes to ingesting data into the ELK stack (Elasticsearch, Logstash, Kibana), you have a few different options, mostly depending on your use cases.

Below are the three main ways of doing so.

Beats

Beats are lightweight data shippers, written in Go. You run them on the same machine

]]>
https://yosuf.dev/elk-data-ingestion-options/621ab6020c9a1ba2e9d3b3aaSat, 26 Feb 2022 23:26:00 GMT

When it comes to ingesting data into the ELK stack (Elasticsearch, Logstash, Kibana), you have a few different options, mostly depending on your use cases.

Below are the three main ways of doing so.

Beats

Beats are lightweight data shippers, written in Go. You run them on the same machine as the source of the data you want to send to Elasticsearch, whether that’s a Docker container, a virtual machine, or your personal laptop. You then configure the relevant Beat to keep an eye on what’s interesting to you. This could be watching changes to files, monitoring the network interfaces, and any other relevant metrics, then gathering that data and shipping it over into some kind of destination That destination could be Elasticsearch, Logstash, Kafka, or something else of your choosing.

Logstash

Logstash is a data collection and transformation engine. You can typically use it as a step before getting your data into your final destination, allowing you to mold your data to your liking first. It’s pretty lightweight compared to other ETL (Extract, Transform, Load) tools while serving the same purpose. Once transformed it can push to a destination of your choice, such as Elasticsearch.

Elasticsearch

Some don’t realise but Elasticsearch itself has a RESTFul API for data ingestion, including bulk insertion.


Now, you have different categories, or use cases, of data ingestion that affect how you choose to ingest data. These categories are: logs, metrics, security, and business analytics.

Logging Data

As a definition, you can think of a log as a file that has lines inside of it where every line is representing a log event (usually, sometimes a log event can be over multiple lines). These logs could come from anywhere: your operating system, Docker containers, web servers, message queues, databases, and so on.

When you have data sources that are logs in nature, the most popular tools are Filebeat and Winlogbeat. This is where you would typically start.

Example of viewing Logs ingested into Elasticsearch, viewed through Kibana. Source: elastic.co.

Metrics Data

These are data sources that are numeric in nature. So these would be system metrics you might get from the same types of sources as above, but also things like your networking or cloud infrastructure, uptime, custom applications you have written, and so on.

If you have data of this nature, you start with Metricbeat. But if it’s network related, Packetbeat is likely what you’re looking for. Logstash itself has inputs that support numeric metric input. So if you’re using GCP for example, it has an input adapter for the PubSub mechanism. You can look up whether Logstash has adapters that support the metric data sources that you’re looking for.

Example of viewing Metrics ingested into Elasticsearch. Source: oreilly.com.

Security Data

This type of data source could be auditing logs from your operating system or a third-party security event management system. It could also include general networking information such as DNS Packets, Firewalls, etc.

For these, you can still use Filebeat, Packetbeat, and Logstash, but you also have Auditbeat available to you, which allows you to monitor Linux audit logs more easily.

Business Analytics Data

These data sources really depend on what you're using. They could be your databases, as well as SAAS offerings like Salesforce, GitHub, social media accounts, and content management systems. You likely won’t have a Beat to get your content into Elasticsearch, so Logstash comes back into play and you’ll have to think about how you can use it with whatever disparate or niche systems you want to ingest data from.

References

https://www.elastic.co/blog/how-to-ingest-data-into-elasticsearch-service

https://www.elastic.co/webinars/ingesting-data-into-elasticsearch-part-1

]]>
<![CDATA[A little about QA Sidekick]]>

A few months ago I tweeted about a project I’ve been working on, QA Sidekick. It’s currently in beta, and if you’re interested in helping test it out, just submit your email on the home page, or reach out to me on Twitter :)

Introduction

]]>
https://yosuf.dev/a-little-about-qa-sidekick/620bfa760c9a1ba2e9d3b399Tue, 15 Feb 2022 19:14:10 GMT

A few months ago I tweeted about a project I’ve been working on, QA Sidekick. It’s currently in beta, and if you’re interested in helping test it out, just submit your email on the home page, or reach out to me on Twitter :)

Introduction

I thought this would be a good time to do a write-up on what QA Sidekick actually is and why I’m building it.

I’ve spent the last few years working as a Software Engineer, crafting user interfaces as well as the APIs that support them. I’ve had the opportunity to work with teams that did agile really well and had cross-functional teams with engineers, designers, and product managers working to define, design, build and ship features together. I’ve also spent some time working in teams that didn’t really have many processes in place, that were very ad hoc, and had loose requirements.

What was true across all of them, was the process of internally testing features manually and providing feedback to the developers for changes was very inefficient, fragmented, and often took much longer than needed. People would miss out on useful information when submitting feedback, sometimes just because it was tedious. Which meant developers often don’t have everything that they could have to debug. There would be discussions back and forth to get more information, and that’s assuming you knew who submitted the ticket to begin with.

Most teams didn’t really have much of a go-to framework for this part of the process either. At one company, we used Google Sheets to manage who was going to do what testing. At another, we had one big Trello ticket for all feedback from everyone for a new release. At best, a different checklist for each person testing. Or a ticket per bug. But these all felt like workarounds, not a solution.

The aim is to help teams go from this, a cycle of back and forth discussions trying to get enough information about what is wrong and how to fix it:

To this, minimising confusion by allowing the person testing to provide everything they possibly can upfront to help the person debugging, with minimal effort, and therefore saving time and launching features faster:

How does it work?

QA Sidekick is a website and a browser extension. Once you’ve signed up and created an organisation for your team, you can then create projects for whatever feature or release that needs testing. For example, you might create a project for “Testing the new landing page”, or another for “Testing the search results page”, which is where everyone’s feedback tickets for that test will live.

You then use the browser extension to submit your feedback for whatever page you’re testing. Just click the QA Sidekick icon next to your address bar and it appears. It allows you to do what you might already be used to, like giving the feedback a title and a description. Then you select the project you created earlier so the extension knows where to send the feedback to.

Image upload

You can also of course upload a screenshot of the bug that you’ve found.

Element inspection

A really handy feature of the extension is you can inspect elements on the page the same way you might in the developer's console, and actually submit the HTML of an element as part of your feedback. This helps the person debugging it later understand exactly what the code looked like at the moment of testing.

Making the tedious trivial

Now, because the extension has context about the page that you’re on, it can collect a bunch of other useful information automatically for you. The things that otherwise might have been tedious to do for every ticket, such as which operating system you’re testing on, what browser you’re using, including the specific versions, what the actual URL you’re testing is, are now included by default. All of this is automatically collected for you and makes life easier for whoever needs to debug the issue later.

And because you’re logged into the extension when testing, it also provided attribution for who submitted the ticket.

Viewing tickets

Then back on qasidekick.com, you can view your submitted ticket in your project, as well as view all of the details.

And that’s a quick run-through.

QA Sidekick is, of course, designed for teams. Whether you’re just a duo building a startup, or a team within an enterprise, it should hopefully provide some structure to how you test and launch new features.

This is the start of trying to fix this process and create a framework to better enable internal testing and feedback. You can get access to the beta right now by just submitting your email on the landing page, or by messaging me. It’s going to be publicly available very shortly and I’d love your feedback to turn it into something that will make you and your team’s lives a little bit easier.

Feel free to submit your email to help beta test, or just stay up to date on progress

]]>
<![CDATA[Setting up your Go environment]]>

Installing Go is pretty straightforward, you can just download it for your system from the go website. Mac OS users can also use brew, and Windows users can also use chocolatey. In both cases, Go should be installed in the correct location and put into the correct executable $PATH.

For

]]>
https://yosuf.dev/setting-up-your-go-environment/6181945d7c6506699fc75517Tue, 02 Nov 2021 20:53:57 GMT

Installing Go is pretty straightforward, you can just download it for your system from the go website. Mac OS users can also use brew, and Windows users can also use chocolatey. In both cases, Go should be installed in the correct location and put into the correct executable $PATH.

For Linux users, once you've downloaded and expanded the tar files, copy it over to /usr/local and set /usr/local/go/bin in your $PATH so you can run go.

Programs written in Go compile down into a single executable file that does not need any other software to run. So you only really need to install Go on the computer that will build the Go code, not necessarily on the computer that will run the final executable.

To test your installation was successful, you can run go version which should print out the version you've just installed.

Your Workspace

You can organise your Go projects as you want, but Go still expects you to have a single place for the libraries you install with go install . You can set this place yourself but it is $HOME/go by default. Either way, it's important to explicitly state where this is in your bash profile.

export GOPATH=$HOME/go
export PATH=$PATH:/$GOPATH/bin

Don't forget to source your .profile to have your updates take effect.

To have a look at all of the environment variables go is aware of, you can run `go env` from your terminal.

$ go env

GOARCH="amd64"
GOENV="/path/to/go/env

What's included, running and building code

Go comes with a ton of stuff off the bat, including a code formatter, a compiler, a linter, a test runner, and a dependency manager.

Here's a simple Hello World program:

//hello.go

package main

import "fmt"

func main() {
	fmt.Println("Hello world")
}

If you run go run hello.go, you should see Hello World printed out onto the console, but you won't find a binary next to your hello.go file. This is because go run compiles your code into a binary, but in a temporary folder which it then deletes after it's done executing your code. This makes it handy to use it for scripting or testing things out.

To create an executable, run go build hello.go. The binary name will by default match the file or package name. You can specify the name or location using the -o flag: go build -o my_custom_name hello.go.

Installing other peoples code

Go uses go install to install third-party software. However, the way Go stores and distributes third-party projects is a little different to other languages, like JavaScript with it's NPM registry. There's no central registry with Go. Instead, projects are shared by their source code and compiled on your machine when you run go install. The command takes an argument which is the location of where the source code's repository is and the version of the code you want. It then downloads, compiles, and installs it for you.

As an example, there's a tool called Hey for load testing HTTP servers. You can install it as follows:

go install github.com/rakyll/hey@latest

This will pull the source code down, compile it for you and turn it into an executable, which you can then run as `hey`:

hey https://golang.org

Formatting

Go has a specific way of formatting code that is built-in as part of the language. Unlike most languages that offer flexibility in how you lay your code out, Go has standardised formatting that makes it easier to write, but also easier to manipulate your source code using external tooling.

It also prevents developers from disagreeing on what the "better" way to write their code is. For example, Go uses tabs to indent and you can't choose to write your function's opening brace on the next line like you can in some other languages, it'd actually give you a syntactical error.

Go comes with the command fmt which formats your code for you into this standardised way.

The semicolon insertion rule

Go requires a semicolon at the end of each statement, but the developers themselves don't put them in, the compiler does.

It follows a simple rule, putting a semicolon at the end of a line if the last item is one of the following:

  • An identifier (e.g. int, float64)
  • A basic literal (e.g. 5, "hello")
  • One of the tokens: "continue", "break", "fallthrough", "return", "++", --", "}", ")"

This simple rule makes the Go compiler faster and simple but also enforces a programming style.

Linting and scanning your code for bugs

The tool golint tries to make sure your code matches the Go style guidelines. It highlights things you could change and gives you suggestions, and its a good idea to take them onboard since Go developers expect code to look a certain way. But it's not completely accurate and can give false negatives and positives.

When it comes to catching errors like passing the wrong number of variables to a function or unused variables, that's what the tool go vet is used for.

Since there are many other tools that you can also run to check code style and find bugs, it can be unruly to run them all individually. You can run multiple tools together with golangci-lint. It runs golint, go vet, and a list of other code quality tools. If you don't agree with all of the suggestions it gives you, you can configure which you want to run and what files they should run on by adding a file called .golangci.yml. Then you can run it as usual with golangci-lint run.

The Go Playground

The Go Playground is a website that gives you a place to quickly try out Go code, similar to Python and Node command-line environments.

This post is some of my notes on Go, the resources I've used can be found below.

Resources

Learning Go - Jon Bodner

Effective Go - Golang

Golang Code Review Comments

]]>
<![CDATA[Becoming a contractor]]>

I've had a few people ask about contracting, and how they ought to go about it, so I thought I'd distill some relevant thoughts here on the topic. I work in tech, but technically this should apply to contracting in most fields.

Why do you want

]]>
https://yosuf.dev/becoming-a-contractor/61366bed986f91635830aa59Mon, 06 Sep 2021 22:15:02 GMT

I've had a few people ask about contracting, and how they ought to go about it, so I thought I'd distill some relevant thoughts here on the topic. I work in tech, but technically this should apply to contracting in most fields.

Why do you want to become a contractor?

This is the first question you should ask yourself, because its answer might dictate whether a) it's actually worth it for you, and b) the kinds of contracts you're willing to take on.

For some, it's the freedom to work on their own projects or own clients outside of work, and dictate their own working hours. For others, it’s the slightly higher pay (since you likely won’t receive any company benefits of any kind, this is typically offset by slightly higher pay for the work you’re doing than if you were in full-time employment). It could also just be the ability to work on different types of projects at different kinds of companies.

But you also loose many of the things a permanent role gives you. You’re usually not eligible for any company benefits. This includes everything from company vacations and retreats, to access to any training the company gives their employees. There’s typically no career guidance or goal setting with a manager at all, because you likely won’t be there for a long time. There’s no incentive for them to invest in you. 360 performance review? Don’t know her. In fact, taking any company benefits jeopardises your position as a contractor, more on that later.

There is of course nothing stopping you from asking for advice and career tips from the people you end up working with, and I highly recommend this because people are awesome. But as a contractor, you shouldn’t expect anything structured as part of your work. You’ll need to pay for any training yourself and do it in your own time.

You’re also giving up job stability. It’s not always easy landing a new contract and you will often have time off between work. Contracts can be 3 months, 6 months, and even 12 months long, all depending on the client. But there will always be some level of uncertainty and you need to be okay with it, or at least be willing to learn to be okay with it. While on this note, you should also have a few months’ worth of savings before you start looking.

All in all, it’s important to make sure your reasoning for going into contracting are well-founded and you’re happy with the trade-offs.

Finding contracts

So let’s say you’re sure you want to take the dive. LinkedIn is your best friend. Not everyone is a fan of having a profile on the service, but it’s genuinely a really great way to share your experience, and more importantly for recruiters to be able to find you. Especially when you set your profile to “looking for work”.

I wasn’t a fan of having recruiter connections on LinkedIn early on, I had this “you need to actually know know everyone you’re connected with for your network to really benefit you” notion. But really, as a contractor, who is likely going to be looking for work more often than a permanent employee, recruiters are your buddies.

Develop a long-term relationship with the recruiters you connect with, explain your interests, goals, and technologies you’re into, and they more often than not work hard to find the work that best fits you. And if they find a role that doesn’t fit you well, but you know someone who would be perfect, forward them! The better your relationship, the more likely they’ll think of you when a new contract lands on their desk.

Not all recruiters are the same though, it can sometimes feel like they’re gatekeeping certain positions or companies, since it’s up to them whether they will forward your CV to the client. But I haven’t found this to be a recurring problem.

You also have to be really quick to respond to recruiters and job ads online because contracts tend to get snapped up really quickly. It can sometimes seem like you gotta take what you can find (ahem 2020 ahem COVID). Patience is really important, I spent about 4 weeks last year hunting for a contract, only for a recruiter to reach out about a contract on a Thursday night, have a phone interview with the CTO on Friday, in person interview on Monday, and started on Wednesday, so all less than a week from finding out the company even existed. And that could’ve easily been someone else if I took my time replying to the recruiter initially.

Beyond LinkedIn, job boards like CW Jobs and Total Jobs usually have plenty of adverts, as well as the ability to upload your CV and make it publicly available to recruiters.

I would say spend some time searching on all of these before you take the dive to see what kind of contract roles are available currently and how you feel about them.

How the contracts work

All of the contracts I’ve had have been through recruiters. Once you’ve gone through the interview process with the potential client, and you’ve landed your first contract, what will typically happen is the recruitment agency acts as an Employment Business. This means they act as a middle man between the client and your company, drafting up the relevant contracts etc. You technically enter into a contract with the recruitment agency, and so does the client with their own contract. The client pays the agency (a little more than what you get paid, hence one of the ways they make their moniess), and you get paid the agreed rate by the agency.

This is how contracts have worked for me so far. It is possible to take on a contract directly with a company, in which case you (your company) would have to take the initiative to draft up your own contracts (should probably involve a lawyer).

Not all contracts are made equal (IR35 enters the chat…)

It’s important to be aware of IR35 legislation, and what it means for the different types of contracts you’ll encounter. It requires in-depth reading itself, so I’ll link some resources at the end, but here’s an overview.

IR35 legislation, also known as Off-Payroll working rules, is a set of government legislation designed to prevent disguised employment.

In a nutshell, if you’re running a company and have clients, then you should be behaving like a company. You shouldn’t set up a company just to contract so you can end up paying less tax, which is the entire reason HMRC introduced and revised this legislation.

Whether a contract is determined to be Inside or Outside IR35 has implications for how you pay tax.

A contract that is considered Outside IR35, is one where you’re genuinely in a company-to-company relationship with the client you’re doing the work for. There are specific indications that point towards this that HMRC will look out for. Can you dictate your own working hours? Do you provide your own equipment to carry out your work? Do you have the ability to send someone as a replacement on your behalf? Can you carry out work for other clients alongside this contract? There are other indicators, but the more of these you answer Yes to, the more likely it'll mean your contract would be considered Outside IR35. This would mean that your company would be paid the entire agreed amount in full, and it would be your responsibility as director of your company to manage your own taxes, and pay yourself as a PAYE employee of your own company.

If the answer to some of these is no, it could be your contract might be determined to be Inside IR35. If this is the case, it’s the responsibility of the client / employment business to deduct PAYE Income Tax and National Insurance from the full amount before paying you, the same as a permanent employee would have their Income Tax deducted before the money hits their account. This is because your relationship with the client resembles that of an employee. A really important point is, it's not necessarily about whats in the paper contract you signed. It's about what your actual working relationship looks like.

https://media4.giphy.com/media/AEpaVDTAop4TC/giphy.gif

Still with me?

Recently, the onus of determining whether a contract is Inside or Outside IR35 fell towards the clients that are looking for contractors. This has meant the number of contracts that are Outside IR35 have decreased, since many companies are trying to mitigate the risk of misidentifying a contract.

If HMRC believes your contract is Inside but you’re working as if it’s Outside, they can launch an investigation to find out. And if it turns out how you work doesn’t match your IR35 designation, both parties could be liable for hefty fines. So it’s pretty important to get your head around it all. It can take some time, but do the reading!

As a last point on this, if you’re taking on an Outside IR35 contract, you’re expected to have your own Limited company that will be providing the specified services, and you’ll have to manage the paperwork yourself. If it’s an Inside IR35 contract, you’ll typically have to work through an existing Umbrella company, which will handle the paperwork and logistics, including deducting the correct amount of income tax and national insurance. You’re usually given a few Umbrella company options to choose from by the client / employment business.

Setting yourself up for Outisde IR35 work

I don’t have any experience with Inside IR35 contracts, so I’ll speak a little on the basics of what’s required to set yourself up as a contractor for Outside IR35 work.

Forming a company

You’ll obviously need to create a company. You can do this directly on Companies House and it costs £12. However, it’s worth bearing in mind that you need to provide a registered address for the company, and all company information is publicly available on the Companies House website. This includes information about the directors and their addresses. There are services that allow you to register a company through them, and not only do they handle submitting the application to Companies House, but they also provide virtual addresses that you can use to keep your own personal address private. There are tons of these, so google for a bit. But I use the privacy package from Your Company Formations.

Banking

You need a company bank account that is separate from your personal bank account. This is very important. You can use any business bank account you fancy.

Accounting

There are certain records you have to keep as a director of a company. You could manage these yourself, but I highly suggest you get an accountant to help you with it.

Ultimately, you’re running a limited liability company, and as a result there are responsibilities you have as a director that you can’t afford to not be aware of. There’s paper work and deadlines for forms that you need to stay on top off, just like any other company, and having an accountant makes it all much easier.

I use Crunch Accounting to manage all of my accounting. They provide software to manage invoices, sales etc, and they also provide a team of accountants to answer any questions you have. You can sign up using my referral link if you’re interested. There are of course plenty others available, but not having an accountant isn’t really a smart option in my humble opinion.

Business insurance

You won’t be able to take on any clients without business insurance in place. I use Kingsbridge Contractor Insurance which was recommended by a friend. You can get a free quote using this referral link.


And that’s it, that’s everything I could think of. This was a long one, but I hope it’s been useful for anyone considering getting into contracting. If you have any other questions feel free to tweet me!

For the sake of clarity, nothing in this piece includes any financial or legal advice. You should speak to actual accountants or lawyers if you need proper advice. Below you can find some useful reads.

Useful reads

GOV.UK - Setup a limited company: step by step

HMRC - Important facts for contractors - off-payroll working rules (IR35)

Crunch - What is IR35? + Business Guide

Crunch - Who determines your IR35 status and who pays employment taxes?

Crunch - Free IR35 assessment calculator

GitHub/tadast - Switching to contracting UK


Subscribe to my Substack to be notified of future posts.


]]>
<![CDATA[Contracting, starting a company, and reflections]]>

At the end of 2019, I quit my full time permanent job. I had spent just over a year or so working at a startup. It was a pretty great place to work, and it actually felt like a startup. There were about 30 or so of us working out

]]>
https://yosuf.dev/contracting-starting-a-company-and-reflections/612dfa5a986f91635830aa0cTue, 31 Aug 2021 10:27:34 GMT

At the end of 2019, I quit my full time permanent job. I had spent just over a year or so working at a startup. It was a pretty great place to work, and it actually felt like a startup. There were about 30 or so of us working out of an open plan office, I joined as the 6th engineer. We had coffee and tea on tap. We had monthly lunches with the whole company. The CEO was a product guy who knew his stuff, was pretty involved and primarily drove the direction of the products that we built.

We worked in cross functional teams so I got to work closely with fellow engineers, design, and product. We were also building a product that necessitated good SEO so I spent time with the Head of Marketing and learned a lot about improving SEO rankings (aka pleasing Google smh).

I had done a lot of this in previous roles, but I had significantly more responsibility in this role, and it was now in the context of a fast moving startup, with rapidly changing priorities.

I got to work with ReactJS and CSS/SCSS on the frontend. We didn't use a CSS framework so I got to hone my custom styling skills, building everything from scratch with CSS Grid and Flexbox. We used Python and Django in a micro-services architecture on the backend. We used Redux to fetch and manage data (though I did miss lovely GraphQL from a previous role).

I learned a tremendous amount while working there, and had the good fortune to work with some amazing people. Not to mention owning stock options was new!

So making the decision to leave wasn't an easy one. I'd even decided to give them 3 months advanced notice instead of the contractual 1 month notice that I needed to. Because they were so dope it was worth not blindsiding them.

So why did I leave?

Working on personal projects has always been quite important to me. These could be small side projects that were purely for learning, or commercial/client projects that generated income. I had also spent a fair amount of time in the past organising events such as workshops and hackathons and wanted to get back in to that at some point.

It often felt like there was only so much you can do in your evenings and weekends when you're working full time, and even less so at a startup.

I spent some time thinking about what my time setup would look like, and what my options were.

So, 2020

I picked a hell of a time to quick my lovely stable job didn't I. But I honestly don't regret it.

I did something that I had been meaning to do for a very long time. It was a risk I was likely going to take at some point or another, and I'm glad it happened when it did. I’ve also been very fortunate to continue finding work since alhamdulilah. But most odd of all, the very company I quit didn’t make it through 2020. (Look at God? Istikhara all the things). They were an events platform, and with all the lockdowns and dwindling revenue, it got quite tough. A rather unfortunate outcome but alas such is life.

I started contracting in March 2020, something I hoped would give me more flexibility and control over my time, so I could continue working on random side projects. The main appeal of contracting for me was the contract itself. I’d contractually be allowed to do what I wanted outside of work, whether that was work on my own commercial projects or taking on an entire second client if I wished. It was a contract of services between two companies, so as long as I delivered on the work I was contracted to do, they didn’t care what I got up to in my spare time. Which is typically quite different to an employment contract, where you might have to ask your manager’s permission to work on anything substantial outside of work. Not to mention vague intellectual property clauses. Most places aren’t so bad, but it’s worth checking your contract if you intend on building anything valuable outside of work. It also meant I didn’t have annual leave, and was just paid for the days that I worked, which meant I didn’t have to think about when I should take what days off.

Over the last year or so, I’ve been fortunate enough to do some work for a startup with a tight deadline, a B Corp where I helped lunch a large product that garnered quite a bit of publicity and some public sector work for Government Digital Service. It hasn’t been too bad alhamdulilah.

What have I learned since?

When you conduct work for various organisations in a short space of time, you tend to pick up similarities in the ways teams work as well as stark differences.

When you work for one or two companies for a relatively long period of time, it's very easy to have a specific view of how projects are created and maintained.

I've worked with organisations that had strict Git flow practices, and others that committed straight to master while relying on pre-commit hooks, feature flags, TDD and pair programming to catch issues. It would surprise you how differently companies work and how different engineering practices can be. This is also very dependent on the type and size of organisation you're working with.

If you were to go and create a side project of your own today, how you go about it and your standard of what you expect from yourself will be heavily influenced by your experience at work. That can be a great thing since you've likely learned some great best practices.

But if you're trying to translate that experience as an engineer into your own startup idea, should you really be setting up a CI/CD pipeline before you've done any feature work? Should you be doing any feature work before you've spoken to a single potential user and validated your idea is even worth spending time on? Probably not. (Totally guilty of this myself). Which can be something you might not pick up if you haven’t worked at a startup that’s very young and has no processes in place but somehow has tons of users already.

In early 2020, I spent some time working on what I'd hoped would become my first product under Artxcode, the company I started to house personal projects and client work. I had worked with Elixir/Phoenix in role a couple of years prior, and I really liked the ecosystem. So I used this mobile app idea as an opportunity to delve back into learning about creating Phoenix + GraphQL APIs, as well as React Native development.

The idea itself was designed to be a silly fun thing to practice with. It wasn't a serious revenue-generating idea at all but a fun nonetheless. Eventually I'd got a few months into working on it and asked myself if the time I was spending was really worth it. I wasn't as interested as I had initially been and it wasn't meant to be a serious project anyway, so I decided to shelve it. I learnt a lot about Elixir's concurrency model. It's ecosystem is amazing but still pretty young and I wish more companies worked with it. A genuinely a beautiful language and I will definitely be using it again in the future inshaAllah. I also learnt another valuable lesson, when to stop working on something. As someone who forces himself to finish a book he no longer finds interesting “because I can’t leave it unfinished”, this was difficult. But it enabled me to move onto other projects that I was more passionate about.

I still maintain that working in a permanent role is the best place to learn as an engineer, and I’m not ruling out going back into perm in the future myself. So if you're new to the industry, take your time. Contractors are typically expected to be quite good at the particular thing they’re being contracted to do, clients really want you to hit the ground running and don’t typically spend much - if anything - investing in you, otherwise they’d have hired a perm employee who’ll be worth their investment long term.

All in all, the last couple of years or so have been quite different for everyone, and I didn’t tick off everything I wanted to do. But I did learn a tremendous amount and I’m pretty happy with the few things that I did alhamdulilah.


Subscribe to my Substack to be notified of future posts.
]]>
<![CDATA[Learning to code and what not]]>

As you may or may not know, I took the traditional route of becoming a Software Engineer. I Studied Computer Science at university, built things in my spare time, yada yada, got a job in tech, then a few more and that’s basically it in a nut shell.

]]>
https://yosuf.dev/learning-to-code-and-what-not/6123e234986f91635830a9b2Mon, 23 Aug 2021 18:08:39 GMT

As you may or may not know, I took the traditional route of becoming a Software Engineer. I Studied Computer Science at university, built things in my spare time, yada yada, got a job in tech, then a few more and that’s basically it in a nut shell.

And I’ve spent some time over the years talking to people who have backgrounds outside of technology, who wanted to transition into tech. They’d studied Chemistry, or English, or Civil Engineering, or Sociology, and they felt like they were constantly playing catch up. And what’s more, there were a few who actually saw their background in a non-tech field as a hindrance to their new career.

It was a specific conversation I had with a friend who was considering transitioning into tech that made me realise something. Even though he enjoyed studying the subject he did at university, he expressed remorse that he hadn’t studied Computer Science.

And this really blew my mind. Because it really didn’t align with how I viewed learning and problem solving in general. I could totally understand the sentiment and why one would feel that way, but I’m of the opinion that having a background outside of tech, and then transitioning into software development, is actually way more powerful than someone who has only studied software engineering / CS. And that this is becoming more and more true every year.

Why?

Because building software is a skill, much like any other, it’s something that you can develop at any point in your life. I don’t think I know of any other field where you can become an expert in a niche and eventually be paid the same amount as someone who has a degree in the subject, without ever having had any academic training in it. The amount of abundant resources that are available to help you learn for free is ginormous. From tech companies themselves no less.

Writing code is a tool that you use to be able to solve problems. But all of the worlds problems can’t be solved with just code. So as someone who has a background in History or Sociology for example, you have a unique set of skills that someone else may not. In my opinion, you’re likely better able to see problems in society and their potential “technical” solutions than a software developer who hasn’t studied these subjects.

(I’m a proponent of studying ALL of the things but alas only so many hours in a day and ones life)

A very beautiful thing about Software Engineering is that it intersects with everything. It compliments every other field or subject that there is. You studied Agriculture? You could apply tech to make yours and others’ lives easier. Studied linguistics? There’s an entire subfield of Computer Science (and linguistics for that matter), Natural Languages Processing, that you’d probably be better suited to than someone who hadn’t studied linguistics.

Having studied other than Computer Science just means you’ll have a cross section of skills that you can use to solve problems that not many other people are equipped to solve.

None of this is to say you shouldn’t study Computer Science at university, you totally should if it’s something you’re deeply interested in. But if you’re deeply interested in something else, like Physics, or Mathematics or Sociology, go and get really good at that thing. And then pick up software development along the way or afterwards. It’s the same reason I advocate for people to maintain their skills from their previous studies and jobs. I try to view life and careers less like a single thing that you’re going to learn and do for the rest of your existence. But to accumulate various seemingly unrelated skills that all provide different views of the world, and therefore equip you with different ways of solving varying and complex problems.

I try to say don’t think of learning to code as much as a career “transition”, and more as a new skill that you’re adding to your toolbox that will enable you to solve more problems.

If you’re picking up coding and you have a career in something completely different, try not to feel like you’re starting from scratch, and certainly don’t feel regretful for not having done so sooner. Knowledge is knowledge and life experience counts for something. You’re not behind, you’re actually much further along than you think.


Subscribe to my Substack to be notified of future posts.
]]>
<![CDATA[Hackathons]]>Scroll for photos.

Hackathons are often described in similar ways wherever you go: as events where you try to build something from scratch with a team of people you know, or don't know in a short space of time, usually a weekend.

But beyond that, the experience of

]]>
https://yosuf.dev/hackathons/60f99207795dd67e535643d6Fri, 15 Nov 2019 21:23:00 GMTScroll for photos.

Hackathons are often described in similar ways wherever you go: as events where you try to build something from scratch with a team of people you know, or don't know in a short space of time, usually a weekend.

But beyond that, the experience of a hackathon can differ quite dramatically depending on how you were introduced to hackathons. I later found out that there are many "corporate" hackathons, where a company typically sponsors and hosts the event in order to generate ideas and products for themselves, imposing quite strict themes of what attendees can build.

There's space for those kinds of hackathons, but they differed very greatly to the hackathons I attended and organised as a student. The purpose of a hackathon is quite important, and we always prioritised learning. The motto we typically used was Learn, Build, Share. The entire point of coming to a hackathon was to leave having learnt something you didn't know before. It's why we had English and History students, people who had never programmed before coming to our events and sitting side by side with the Computer Science

We provided some themes to spark ideas and win prizes, and so did our sponsors, but you by no means needed to build anything according to any theme whatsoever. You could build anything you wanted, as long as you were learning something new and having fun. You could come, eat the free food we provided, learn loads and leave, without any expectations of presenting anything (it's even more fun if you did though!). I hope to get back to organising these kinds of hackathons again in the future inShaAllah.

You can read about my experience starting my university's tech society here. Below I've put together some notes and pictures of the two larger hackathons I helped organise, feel free to pree!

Hack City 2018

Sponsors: Accenture, Cisco, GitHub, Starling Bank, Firstco, Nexmo, Societe Generale, Digital Ocean, .tech domains, Bloomberg, BlackRock.

Links

Winners Announced in the SU Carrot Awards 2018
Awarded Event of the Year at City
First year students win Accenture challenge at hackathon | University of Surrey
Students from Surrey won the Accenture challenge
Live: HackCity 2018 - City, University of London’s Annual Hackathon 2018 on 17th - 18th February 2018
HackCity is back again for it’s 2nd year! HackCity team is welcoming students from all over London, the UK and Europe, for all student fun and free Hackathon.
One of the Accenture representatives live blogged the event

Photos

Photos curtesy of Harshpal, more can be found here.

Hack City 2017

Sponsors: Accenture, GitHub, Starling Bank, Digital Ocean, Findmypast, .tech domains, Resin.io, AI Gaming, Balena, Bloomberg.

Links

Students’ Union Awards 2017 - Winners Announced
Awarded Best New Society

Photos

Photos curtesy of Major League Hacking, more can be found here.


Subscribe to my Substack to be notified of future posts.
]]>
<![CDATA[Notes on Haskell]]>These are notes from my lectures at university augmented with some online and textbook reading. They’re unfinished but they’ve been sitting in my drafts so I thought I’d publish them in case others find them useful.

Surely there must be a less primitive way
]]>
https://yosuf.dev/notes-on-haskell/60fd7014795dd67e53564474Fri, 14 Sep 2018 14:07:00 GMTThese are notes from my lectures at university augmented with some online and textbook reading. They’re unfinished but they’ve been sitting in my drafts so I thought I’d publish them in case others find them useful.

Surely there must be a less primitive way of making big changes in the store than by pushing vast numbers of words back and forth through the von Neumann bottleneck. Not only is this tube a literal bottleneck for the data traffic of a problem, but, more importantly, it is an intellectual bottleneck that has kept us tied to word-at-a-time thinking instead of encouraging us to think in terms of the larger conceptual units of the task at hand. Thus programming is basically planning and detailing the enormous traffic of words through the von Neumann bottleneck, and much of that traffic concerns not significant data itself, but where to find it. — John Backus

Contents

  • Thinking functionally
  • GHCi
  • Basics
  • Lists
  • Expressions and Types
  • Functions
  • Constrained Polymorphism
  • Language Details

Thinking Functionally

Procedural programming closely mirrors the underlying architecture and focuses on how something is done. Declarative programming (including functional) focuses on what the answer is and provides powerful abstraction (generalisation) mechanisms, as well as being concise and expressive.

Functional programming is programming with functions (lol). The most basic component is a function. They determine a unique output for each combination of inputs.

Instead of asking “How do I change the value of a variable?” or “How do I write a loop?”, ask “What value do I want to produce?”, “How can I make it from the input?” “What are the intermediate values?”.

Expressions are just their values and should be interchangeable.

GHCi

GHC is the compiler for Haskell. GHCi is the interactive environment in which Haskell expressions can be interactively evaluated and programs can be interpreted. It’s what you use on the command line to write Haskell. If you want to follow along, you can either download GHCi or use repl.it for a browser-based environment.

Prelude is just what you get for the command prompt when inside GHCi:

Prelude>

GHCi Commands

:load filename … (or :l as a shortcut) — loads modules from specified 
files:reload (or :r) - repeats the last load command
:type exp (or :t) - prints the type of the expression
:quit (or :q) - exits the interpreter

Basics

Examples of basic math operations as well as using built-in functions:

Prelude> 2+3
5

Prelude> 2+3*5
17

Prelude> (2+3)*5
25

Prelude> 2^3
8

Prelude> sqrt 2
1.4142135623730951

Prelude> sqrt 2 + 3
4.414213562373095

Prelude> sqrt (sqrt 2)
1.189207115002721

Prelude> max 4 8
8

Prelude> div 13 5
2

Prelude> mod 13 5
3

Prelude> 13 `div` 5
2

Prelude> 13 `mod` 5
3

The last two are examples of infix functions (take note of the weird quotes).

Lists

Prelude> [1, 1+3, 1+3+5]
[1,4,9]

The value of [a..b] is a list of integers starting at a and ending at b.

Prelude> [1..6]
[1,2,3,4,5,6]

Prelude> [2..2]
[2]

Prelude> [6..1]
[]

Prelude> [6,5..1]
[6,5,4,3,2,1]

Prelude> 1:2:[]
[1,2]

Some list related functions:

Prelude> product [3,4,5]
60

Prelude> product [1..7]
5040

Prelude> product []
1

Prelude> length [1,3,5]
3

Prelude> reverse [1,3,5]
[5,3,1]

If you’re wondering why product [] = 1, its because of the identity in the category of multiplication. A practical explanation:

product [1,2,3]
	== product [1] * product 2:3:[]
	== product [1] * product [2] * product 3:[]
	== product [1] * product [2] * product [3] * product []

which allows us to implement it with simple recursion:

product [] = 1
product (x:xs) = x * product xs

In Haskell, strings are just lists of characters:

Prelude> ['H', 'e', 'l', 'l', 'o']
"Hello"

Prelude> ['a'..'z']
"abcdefghijklmnopqrstuvwxyz"

Prelude> length "Hello"
5

Prelude> reverse "Hello"
"olleH"

[char] is synonymous with String.

Expressions and Types

Basic Types in Haskell

Types

Every expression in Haskell has a type.

Unlike some languages like Java and Pascal, Haskell has type inference. If we write a number we don’t have to tell Haskell it’s a number. It can infer that on its own, so we don’t have to explicitly write out the types of our functions and expressions to get things done.

Types are sets of values, and Typeclasses are sets of Types.

For example, the type Integer includes values like 3 and 8, and the Typeclass Num includes the Types Integer and Double.

This is somewhat analogous to Java, where Classes are sets of Objects, and Interfaces are sets of Classes:

Checking the type of 3 gives us a weird answer:

Prelude> :t 3
3 :: Num a => a

Here, a is called a type variable. Everything before the => is called the class constraint. The above says “there is some type a in the typeclass Num, 3 is of type a.” The value of 3 belongs to every type in the Num typeclass, including Integer and Double. Haskell is just being lazy and not committing to a specific type.

Functions also have types:

Prelude> :t head
head :: [a] -> a

This says for any type a, the function head takes a list of as and returns an a. (head returns the first element of a list).

We can even ask for the type of a plus operator. We surround it with parentheses since its an infix operator (meaning we usually use it between values: 2 + 2, otherwise GHCi will get confused and think we’re actually using it ):

Prelude> :t (+)
(+) :: Num a => a -> a -> a

This says: “There is some type a in the typeclass Num, “+” takes two as and returns another a.

How about the function zip:

Prelude> :t zip
zip :: [a] -> [b] -> [(a, b)]

Zip takes a list of as and a list of bs and it returns a list of (a,b) pairs.

We’re allowed to specify the type of a function along with its definition, which is generally considered good practice:

add :: Integer -> Integer -> Integer
add x y = x + y

On the first line, we explicitly tell Haskell that the add function we’re about to define takes two Integers and returns an Integer. Then we define the function on the second line.

Being explicit about types provides some documentation for us and anyone who reads our code, but it also helps us find bugs. For example, say we have the following function:

dividesEvenly x y = (y / x) * x == y

This function is meant to tell us if x evenly divides into y. So if x=2, and y=5, we would expect (5/2) to be 2, since 2 goes into 5 twice, then 2*2 would give us 4. 4==5 is not true so we would expect this function to return False given 2 5 as arguments. However, it returns True.

Prelude> dividesEvenly 2 5
True

This is because, in Haskell, 5/2 is not 2, but 2.5. One way to address this is to specify that we expect x and y to be Ints:

Prelude> dividesEvenly :: Int -> Int -> Bool
Prelude> dividesEvenly x y = (y / x) * x == y

However, this gives us an error:

<interactive>:3:1: error:    
	• No instance for (Fractional Int)
	    	arising from a use of ‘dividesEvenly’

It is telling us that Int is not a member of the typeclass Fractional. The / operator only works on Fractionals. Turns out the operator we want is `div`:

Prelude> dividesEvenly :: Int -> Int -> Bool
Prelude> dividesEvenly x y = (y `div` x) * x == y
Prelude> divideEvenly 2 5 False

By specifying the type of our function, we were able to find a bug that we may have otherwise missed.

Functions

Infix Operators

Haskell permits the usual infix notation:

Prelude> 1 + 2*3
11

The infix operators + and * refer to functions that take two arguments. Operators also have precedence and associations. To refer to these kinds of functions by themselves, we wrap them in parentheses, writing (+) and (*). So we can use them like this:

Prelude> (*) 2 5
10
Prelude> (+) 1 ((*) 2 5)
11

If we have ordinary identifiers that refer to binary functions:

div :: Int -> Int -> Int
mod :: Int -> Int -> Int

we can use them as infix functions by wrapping them in backquotes:

Prelude> (1987 `div` 100) `mod` 4

which is the same as:

Prelude> mod (div 1987 100) 4

Functions on Int

(+) :: Int -> Int -> Int
(-) :: Int -> Int -> Int
(*) :: Int -> Int -> Int
(^) :: Int -> Int -> Int
div :: Int -> Int -> Int
mod :: Int -> Int -> Int
abs :: Int -> Int
negate :: Int -> Int

Examples:

Prelude> abs 3
3

Prelude> negate 3
-3

Prelude> abs (negate 3)
3

Prelude> negate (negate 3)
3

Prelude> abs 0
0

Prelude> negate 0
0

Relational Operators

(<) :: Int -> Int -> Bool
(<=) :: Int -> Int -> Bool
(>) :: Int -> Int -> Bool
(>=) :: Int -> Int -> Bool
(==) :: Int -> Int -> Bool
(/=) :: Int -> Int -> Bool

Examples:

Prelude> 2 < 3
True

Prelude> 2 < 3
True

Prelude> 2 < 2
False
Prelude> 2 /= 2
False

Prelude> 2 /= 3
True

Overloading

The (==) function has several types:

(==) :: Int -> Int -> Bool
(==) :: Bool -> Bool -> Bool
(==) :: Char -> Char -> Bool
(==) :: Float -> Float -> Bool
(==) :: Eq a => a -> a -> Bool
(<=) :: Ord a => a -> a -> Bool

Building Boolean expressions

(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
not :: Bool -> Bool

Examples:

Prelude> not True
False

Prelude> False || True
True

Prelude> 1 < 2 || 1 > 2
True

A function using relational operators:

small :: Int -> Bool
small n = 0 <= n && n < 10

Functions between types

Haskell has no implicit conversion between types. You must use explicit functions:

To use the ord and chr functions, you must import the Data.Char library module:

Prelude> floor 3.7
3

Prelude> ceiling 3.7
4

Prelude> :m + Data.Char

Prelude> ord 'a'
97

Prelude> chr 98
'b'

Functions of Char

isDigit :: Char -> Bool
isDigit c = ’0’ <= c && c <= ’9’
isUpper, isLower :: Char -> Bool
isUpper c = ’A’ <= c && c <= ’Z’
isLower c = ’a’ <= c && c <= ’z’
isAlpha :: Char -> Bool
isAlpha c = isUpper c || isLower c
ord :: Char -> Int
chr :: Int -> Char

Examples:

Prelude> :m + Data.Char

Prelude> isDigit '2'
True

Prelude> isLower 'B'
False

Prelude> ord '1'
49

Prelude> chr 65
'A'

Prelude> chr 48
'0'

Prelude> chr 32
' '

Prelude> chr (ord 'b')
'b'

Prelude> chr (ord 'b' + 3)
'e'

Functions on Float

(+) :: Float -> Float -> Float
(-) :: Float -> Float -> Float
(*) :: Float -> Float -> Float
(/) :: Float -> Float -> Float
(^) :: Float -> Int -> Float
abs :: Float -> Float
negate :: Float -> Float
sin :: Float -> Float
asin :: Float -> Float
exp :: Float -> Float
log :: Float -> Float
sqrt :: Float -> Float

Guarded Definitions

maxTwo :: Int -> Int -> Int
maxTwo x y
	| x >= y = x
	| otherwise = y

The Boolean expression x >= y is called a guard. Guards are tested in order, so if we had:

maxThree :: Int -> Int -> Int -> Int
maxThree x y z
	| x >= y && x >= z = x
	| y >= x && y >= z = y
	| otherwise = z

it could be simplified to:

maxThree :: Int -> Int -> Int -> Int
maxThree x y z
	| x >= y && x >= z = x
	| y >= z = y
	| otherwise = z

Conditional Expressions

Haskell also has an expression form: if boolexp then exp1 esle exp2 .

So instead of:

maxTwo :: Int -> Int -> Int
maxTwo x y
	| x >= y = x
	| otherwise = y

we could write:

max :: Int -> Int -> Int
max x y = if x >= y then x else y

You can also define functions using existing functions. So you could turn this:

maxThree :: Int -> Int -> Int -> Int
maxThree x y z
	| x >= y && x >= z = x
	| y >= z = y
	| otherwise = z

into this:

maxThree x y z = maxTwo x (maxTwo y z)

Local Definitions

You can have local definitions which are further indented and must line up:

sumSquares :: Int -> Int -> Int
sumSquares n m
	= sqN + sqM
		where
		sqN = n*n
		sqM = m*m

You can use local definitions in all guards, as well as the right-hand expressions:

maxsq :: Int -> Int -> Int
maxsq x y
	| sqx > sqy = sqx
	| otherwise = sqy
	where
	sqx = sq x
	sqy = sq y
    
	sq :: Int -> Int
	sq z = z*z

Constrained polymorphism

For example, the “element” function takes two arguments and asks “does the first argument occur in the second argument (which is a structure of some kind)? And it works for multiple types:

Prelude> elem ‘e’ “Hello”
True

Prelude> elem 3 [1..5]
True

This function is almost polymorphic: the types of things being compared must support equality testing, which is reflected in the constrained type of elem:

Prelude> :t elem
elem :: (Eq a, Foldable t) => a -> t a -> Bool

Here, Eq a is a constraint on the type of a. The type a must belong to the typeclass Eq: those that support equality testing such as Char, Int and Integer.

Language Details

Indentation

In files, Haskell uses indentation to decide where another definition starts, so all definitions must have the same indentation. The following would be seen as two definitions and is legal:

square
	:: Integer -> Integer
square n = n * n	

The following are not legal, Haskell sees the first as one definition and the second as two definitions:

square :: Integer -> Integer
	square n = n * n


square
:: Integer -> Integer


Subscribe to my Substack to be notified of future posts.


]]>
<![CDATA[Self-discipline]]>Self discipline and grit is something I feel we all struggle with (I certainly do). Whether we’re trying to learn a new skill, break a bad habit or get fit, consistency is something you can’t really get around.

But the usefulness of self discipline is often

]]>
https://yosuf.dev/self-discipline/60fd6d35795dd67e53564456Mon, 28 May 2018 13:55:00 GMTSelf discipline and grit is something I feel we all struggle with (I certainly do). Whether we’re trying to learn a new skill, break a bad habit or get fit, consistency is something you can’t really get around.

But the usefulness of self discipline is often underrated. Some people find disciplining themselves easier than others, but you can argue that it is a skill that can be improved. It’s also something that you can apply to multiple completely different facets of your life. From trying to memorise the Qur’an to eating more healthily to seeing through this incredibly difficult project you’re working on. But being a skill also means it’s likely not something you’re going to be good at from the get go, it’s something that needs to be deliberately practiced.

A pitfall you can fall into is a false sense of progress. It’s easy to work on something and feel like you’re making progress simply because you’re spending time on it. Time spent doesn’t necessarily equate to value gained. This is why it’s important to find a single thing that you want to do that you can use as a proxy for improving your self-discipline, which you can then apply to other parts of your life.

I often recommend working out. You should work out. Yes, you. If you already do, great. If you don’t you should really start. And I don’t mean going to the gym. If you want to go to the gym, please do. But the point here is to give yourself a goal that is slightly above your current physical limit. It can be as simple as, if you can do 0 push ups right now, try and practice till you get to 10. Or 5 even. The goal here isn’t to get super fit, it’s to practice self discipline. If you can nail the grit part, the fit body part will follow.

The reason I say you should work out is because self discipline is a transferable skill. And fitness is the one activity I’ve found where I can’t cheat. I can’t trick myself into thinking I’m making progress. You can see results. And if you cant see them yet you can feel them. Going from being able to do 0 sit ups, to 5, to 10 is tangible progress that doesn’t necessarily take too long, if you’re being consistent.

The important part though, is when you hit a wall and feel like you can’t really do any more, but force yourself to anyway and persevere past it. This is where we usually take a 3 hour break from our essay, or reopen twitter on our phones. Trying to get passed this wall is where progress is made.

It doesn’t have to be working out though. I only picked it because it’s a framework that kinda works for me and is usually something that people want to get better at. Maybe there’s something other than fitness that would work better for you when it comes to developing self discipline. The idea is to pick one thing that allows you to track small steps of progress and stick to it. If you can’t think of anything try fitness, but it helps if it’s something that you want to do. InshaAllah we can all get to a point where we can apply ourselves to reach whatever spiritual, physical and generally beneficial goals that we set ourselves.

Also, if you suffer from procrastination, here are a couple of articles I’ve found useful that you can productively procrastinate on, I recommend reading them in order:

Part 1: Why procrastinators procrastinate
Part 2: How to beat procrastination

There's also a TED Talk version of them by the author.

The Prophet Muhammad ﷺ used to seek refuge in God from laziness, reciting the following supplication:

اَللّٰهُمَّ إِنِّيْ أَعُوْذُ بِكَ مِنَ الْهَمِّ وَالْحَزَنِ ، وَأَعُوْذُ بِكَ مِنَ الْعَجْزِ وَالْكَسَلِ، وَأَعُوْذُ بِكَ مِنَ الْجُبْنِ وَالْبُخْلِ ، وَأَعُوْذُ بِكَ مِنْ غَلَبَةِ الدَّيْنِ وَقَهْرِ الرِّجَالِ
O Allah, I take refuge in You from anxiety and sorrow, weakness and laziness, miserliness and cowardice, the burden of debts and from being over powered by men.

Do not forget to ask Allah for help in everything it is you do.

]]>
<![CDATA[Starting City Tech Society]]>

This is kind of like a recap of my experience running my university’s tech society, as well as of my previous academic year in general.

When I first started university, the first thing I did was go to the freshers fair. I had a few interests that I

]]>
https://yosuf.dev/starting-city-tech-society/606f851c544e0c65c216709eSat, 08 Jul 2017 22:37:00 GMT

This is kind of like a recap of my experience running my university’s tech society, as well as of my previous academic year in general.

When I first started university, the first thing I did was go to the freshers fair. I had a few interests that I was hoping I’d find societies catering for, namely technology. I got there early and and spent longer than I probably should have looking for a tech society. Long story short, there wasn’t one which I was quite bummed out about.

I did, however, come across CityStarters. They’re less of a society and more of the university’s entrepreneurship arm. I’ve always had a strong interest in startups so I signed up to be notified about their events. I went to every single one of their events in my first year, of which there were dozens, almost like I was filling some sort of void. I met some pretty interesting people and generally found the events to be great.

But towards the end of the year, I kind of realised something. Of all the people I had met at these events, barely any were technical. I met two other Computer Science students there over that entire academic year. Most of the students who attended these events were business students from Cass, our university’s business school. Those who weren’t Cass students weren’t students at all, since these events were open to the public.

There weren’t any engineers, no techies. I’d tell people I’m a Computer Science student and they’d offer me to be their CTO. Like, no, I’m just learning Java out here. You haven’t even asked me my name yet.

There was this huge mismatch. You had these awesome startup events on campus, and engineering and technology students next door who weren’t going to them. Wut. I didn’t exactly know why, whether they didn’t know about the events. or just didn’t have any interest.

Starting a tech society had been lingering on my mind since that first freshers fair, but it seemed more and more like something that I needed to do. If only to expose technical students to entrepreneurship.

Separately, I liked working on side projects and talking about side projects with other people. But I hadn’t come across many students who also worked on projects outside of the curriculum, out of pure interest.

I didn’t know if these people existed, or if they did and we all just built things and went to events in silos because there was no way of knowing who else was into the same things. There wasn’t much of a hacker culture at the university.

I spent my second year working as a teaching assistant at the university, which is how I met Abdul. We went to HackLondon 2016 together, our first hackathon. Then a few more after that. Along the way we discovered the Hackathon Hackers EU community, which is a sub community of a larger global community of students and graduates who like going to/ organising hackathons and building awesome stuff. I mean, GitHub would sponsor monthly dinners where you’d just turn up to Nandos, chat with interesting people over dinner, and they’d get the bill. Free food and talking tech. How did we not know about this before. This community is also how I met Joe Nash, among other awesome people who’ve been a great help.

Myself and Abdul started planning for a tech society at City around April 2016, maybe slightly before that. Hackathons, technical workshops and tech talks were on the agenda. This was towards the end of that academic year so we couldn’t do a whole lot, but we did run a tech talk as a trial, where we invited some game developers to talk to students about what they did. We had a decent turn out and learned a lot about the kind of community we wanted to build. I was still working at the university which gave me access to staff meetings, where I kind of ‘announced’ the tech society initiative to lecturers and teachers in the hopes of getting some support. There was some good feedback and excitement and it was good to know that we had the Department of Computer Science’s backing.

We spent the summer setting up meetings and planning for the kinds of events we wanted to host. A Trello board was set up, a Slack team, a domain name registered (obv) and a site built. We brought Thea onto the committee the following academic year, she’d taken over my role as student teaching assistant at the university. It proved to be quite useful having a member who was also a liaison with the Department.

We went to a conference in the Netherlands in September, organised by Major League Hacking and hosted by GitHub. Students from across Europe came together to learn and teach each other about how to organise hackathons. It was invaluable to say the least.

Photo of attendees of Hackcon EU at the High Tech Campus in Eindhoven.
High Tech Campus, Eindhoven. Photo curtesy of Major League Hacking

There was also the tremendous help being a GitHub Campus Expert provided (shout out to Joe Nash and GitHub Education again). If you’re a technical student anywhere in the world, check out the programme. In short, it provided a great deal of technical leadership training and access to educational events that I otherwise would probably not have gone to.

A photo of the Campus Experts that attended GitHub Satellite 2017.
GitHub Satellite 2017, London.

One of the other events we hosted was a mini-conference titled ‘Developing As a Developer’, which was a non technical event on how to overcome self doubt and other hurdles. The keynote was given by

Amy Dickens, an awesome fellow GitHub Campus Expert from the University of Nottingham, on how to overcome impostor syndrome.

I spent a great deal of time trying to convince my department to include the teaching of Git in the curriculum.

Lo and behold, a lecturer reached out after finding out that I was the university’s GitHub Campus Expert, and asked me to deliver a lecture on Git as part of his module. I mean I wanted Git taught, bc awesomeness, but meee, give a lectureee. Is you mad. It helped that these were the same set of students that I had spent the previous year teaching, though never in a lecture setting.

But I gave the lecture and it went well. Having done Git workshops prior to this had also helped.

Photo of Yosuf giving a lecture on Git
‘Moonlighting as a lecturer’ - photo courtesy of Abdul

Of all of our events, our largest was our flagship, HackCity. It was City’s first full fledged hackathon, and we spent about 7+ months planning for it and more money than we thought was possible to spend on a weekend event. (Shout out to Curtis, who joined the society’s committee in January and hit the ground running, handling pretty much all of our sponsorship. Jordan also joined the same time and came on to handle all of our design work. Both did amazing work).

It took a tremendous amount of effort to pull off, especially given the fact it was our first of this size. We had a great deal of help from GitHub and Joe Nash, as well as invaluable advice from students across the UK who had organised hackathons before. Thanks also to all of the volunteers who helped during the event.

Things weren’t exactly smooth sailing organising the event, they rarely are with hackathons. But the event itself was a huge success. We had over 140 people from across UK and beyond attending, with students coming from as far as Paris, France.

I could probably write a separate piece on my experience organising HackCity, so I’ll stop here. The Department of Computer Science were a great help throughout the year. And a special thanks to the Students’ Union for saving our asses more than once. Here are some photos from the event:

Photos curtesy of Major League Hacking.

After we had wrapped up our events for the year, the Student Unions Awards ceremony began to approach. We had been shortlisted for best new society, though there was pretty good competition. I believe there had been about 50 new societies this year. But we ended up winning. Thanks to everyone who voted 🙌🏾.

After some time, I got a call from the Student’s Union saying they wanted to nominate us for the National Societies Awards. After nominations had closed, we ended up being shortlisted as one of six chosen societies for Best New Society in the UK.

We came second place🔥.

Abdul and Curtis (centre) picking up the award at the University of Nottingham, where we were ranked 2nd nationally

This year was by far my most stressful year. I’ve never dealt with more emails in my life. (I was also an almost full-time software engineer which actually also helped but also not really lol). 90% of everything I did this academic year was outside my comfort zone. But most growth happens outside of your comfort zone. It helps to have a support network and an idea of what you want to do, but sometimes you kinda just have to jump into it.

Sometimes you’ll need to take breaks, and Lord knows I switched off at times (shoutout to Abdul and the rest of the team for dealing with my randomly going offlines lol) which is fine I think, but it also stresses the importance of having people who are as passionate about what you’re doing as you are, and a system which means anyone can pick up where someone else leaves off.

I’ve kind of glossed over some things bc otherwise we’d be here forever. But if you want to chat about anything mentioned, feel free to reach out.

The HackCity photos above are courtesy of MLH and you can find more here. Photos of our other events can be found here.

You can also keep up with what the tech society is up to on twitter and facebook. Abdul will be taking over as president for the coming year and it’s gonna be great. I’ll of course still be around, but I should probably give this studying thing a chance lol.

]]>
<![CDATA[climbing Scafell Pike]]>

Every year, charity week is held all over the world in order to raise money for the less fortunate.

Students at universities across the UK (and the world) try to do their part by holding events throughout the week to raise money. At City, we set up sweet stalls, held

]]>
https://yosuf.dev/climbing-scafell-pike/6106f46a795dd67e53564552Fri, 16 Dec 2016 20:26:00 GMT

Every year, charity week is held all over the world in order to raise money for the less fortunate.

Students at universities across the UK (and the world) try to do their part by holding events throughout the week to raise money. At City, we set up sweet stalls, held a games night, a charity football tournament, a charity auction, and a sponsored mountain climb, all of the proceeds of which went to charity.

I had the opportunity to take part in some of the events that were being held on campus, as well as the climbing England's tallest mountain. I hadn't climbed a mountain in years since that one time I went to Wales with my school (though now in hindsight, I'm starting to think it may not have technically been a mountain). I remember it being the best part of that trip so I thought I would use this as an opportunity to take a break and spend some time with nature.

But for a lot of the students who went on this mountain climb, including myself, it wasn't just about the scenery. It was primarily about appreciating the difficulty some people around the world have to endure on a day to day basis. The kids that have to walk for miles every morning just to get to school. The families who walk for ages just to find some water. Those that have to brave hardship out of necessity. It was about appreciating what you have, being thankful for it and praying for those who have less.

It was also an amazing bonding experience. It was pretty awesome to see how everybody helped whoever needed help. You got to know your friends better and made new ones.

We left London via coach late on a Friday night and reached the Lake District 7 hours later. A rough night there and back to say the least, but well worth it.

climbing up

there were about 90 of us

a river

clean enough to drink + make wudhu

random

random ppl

summit in sight

when the summit is finally in sight

closer to the summit

closer yet

the top of the mountain

finally reaching the top of the mountain

going back

when you realise you now have to somehow get back down

Some tips for anyone planning on climbing a mountain:

  • Leave the base of the mountain early in the morning, just after sunrise. The last thing you want to be is stuck on the mountain at nightfall.
  • Take extra clothes: trousers, tops, jumper, SOCKS.
  • Take a flash light, gloves and mountain shoes, even if you'll never wear them again. You need proper footwear with ankle support.
  • Take energy: stock up on liquids and food/snacks with high energy.
  • Get a good night's sleep the night before.
  • Try not to climb in groups of less than 4, seriously.
  • Google this because I've probably left things out.
]]>
<![CDATA[teaching at university]]>

I only recently realised it's been a very long time since I last I last posted a piece. Almost a year. I was going to put a lot of content into this one post, but I thought it'd be better to separate them out.

I guess

]]>
https://yosuf.dev/teaching-at-university/6106f217795dd67e53564542Fri, 16 Dec 2016 20:12:00 GMT

I only recently realised it's been a very long time since I last I last posted a piece. Almost a year. I was going to put a lot of content into this one post, but I thought it'd be better to separate them out.

I guess it's been an interesting year. I spent the previous (my second) academic year working at my university, teaching first-year computer science students which was pretty cool. One of the reasons why I decided to apply for the position was to solidify my understanding of what I'd learned myself the year prior. You can't really teach something you don't know. But the other motivation was to get out of my comfort zone and to develop myself in ways more than just technical. Public speaking isn't exactly my forte, but it's a skill I feel I'll probably need in the future. Teaching a room of 30+ students is a good stepping stone, and it turns out I'm not so bad at it now.

If you're the smartest person in the room, you're probably in the wrong room.

It also meant I got to spend my day to day hours with teaching assistants, lecturers, and professors. Multitudes more contact hours with super smart people. Spending time with their combined knowledge was another reason why it was so compelling to work there.

Spending a year teaching at university gives you a real appreciation of how much effort the teachers and staff go to. I mean you'd think of course it's hard, they're teaching at university. But it's hard to fully acknowledge the lengths those who genuinely care about teaching will go to to do a great job.

I stopped teaching at City at the end of June because I found a summer internship. Referring to my teachers as my colleagues took some getting used to. But I'm glad I had the opportunity to spend more time with such hardworking people and to teach some awesome humans.

----------------------------------------

Also, see if you can spot me in the cover photo of this post.

It's from a two-week coding bootcamp that take's place at the beginning of the first-year Computer Science course at City. It's a rigorous introduction to programming using the Processing programming language, which is based on Java. At the end of the two weeks, the students present what they've managed to build during that time at a fair, which is what's happening in the picture.

]]>
<![CDATA[December '15]]>

Thankfully, its been a productive month or two.

WordPress -> Ghost.

Initially, my website was built entirely on WordPress. I've always liked WP, but I wanted to try out this Ghost thing people had been talking about. It looked really good (huge fan of minimalism) and I&

]]>
https://yosuf.dev/december-15/6106eca6795dd67e53564528Thu, 31 Dec 2015 19:49:00 GMT

Thankfully, its been a productive month or two.

WordPress -> Ghost.

Initially, my website was built entirely on WordPress. I've always liked WP, but I wanted to try out this Ghost thing people had been talking about. It looked really good (huge fan of minimalism) and I'd wanted to split my website from my blog for a while now. I'd considered building a theme for Wordpress that was just for me, but checking out Ghost seemed more enticing.

First thing I had to do was gain SSH access to my server, which I did. But when I tried installing Node.js, it just wasn't working. Sudo wasn't working, nothing was working. This was more frustrating that usual since I hadn't had much experience with the command line.

It turns out, my hosting provider wouldn't let me install node.js (or anything via SSH) because I was using shared hosting, which sucked. I needed a VPS. I remembered that I'd gotten some free credit for Digital Ocean with my GitHub education pack, so I thought I'd check them out. They're awesome. It was somewhat daunting to begin with since pretty much everything is done via SSH, but that just meant I could spend time getting comfortable with the command line. DO's community is amazing and I found their tutorials really helpful. I learnt about using SSH, securing a server from vulnerabilities, and managing DNS, among other things, all without leaving DO's site.

I redid my website on the main domain, while hosting my Ghost blog in a sub directory, which turned out to be an absolute pain. I'd installed Apache because that's what I'd always used for web dev, but Node.js takes quite some configuring to reverse proxy to Apache. In the end, I just installed NGINX which played a lot nicer than Apache.

Python Progress

So I've been learning Python. Python is a cool language, but learning a new language can be frustrating since much of the learning content out there assumes no prior programming experience, so they start with variables and if statements. But I've been following parts of Udacity's Full Stack Development courses, which are taught in Python.

It took me a while to get my head around using Python within the context of web development, especially having come from PHP, where there's not a whole lot of setup needed. This python docs page proved to be insightful, as well as this stackoverflow answer. The former cleared up MVC's for me, as well as the use of templates.

Using OOP on the server-side with databases just baffled me for the longest time as well (as is evident from this malarkey). This confusion was mainly because I just couldn't see how data in objects could then be pushed to a database. Like, why not just stick with functions that are called when they're needed (like I had been doing with PHP for so long). That was until I came across Object Relational Mapping in Udacity's Full Stack Foundations course built by Amazon Web Services (which I haven't finished yet). They introduced SQLAlchemy but didn't delve too much into ORMs in general. There were different OR-Mappers for different frameworks and what not. But I didn't care at this point, there were too many lights going off. I didn't even know ORMs existed. It just made sense. At least now I could happily OOP everywhere.

It felt like I was learning all these things some-what abstractly, applying them to minor exercises that would be thrown away. So I'm thinking I'll just rebuild the filesharing site I'd been thinking about, but in Python. The creation of the site itself wouldn't be all that point-full , given that others like it exist. But this would just be for practice. I had also planned to eventually get into Django so this may be a good opportunity to do so. It may be framework overkill for a small project, but it'd help get it off the ground as well as allowing me to get familiar with Django's parts (including my new friend, the ORM).

I think I'll checkout Udacity's Intro to CS course, before diving into Django's documentation. Not that I need an introduction to CS, but because Python! Also, you can't really say no to learning how to build a search engine and a social network.

Machine Learning

Artificial Intelligence is awesome, I find it fascinating. I'm hoping to get more and more into it. I've started a Machine Learning course on Coursera which has been great so far. Its taught by Andrew Ng, a professor at Stanford University who also happens to be one of the founders of Coursera (his ML MOOC is the one that led to Coursera's founding, cool huh?). He was also one of the founders of Google Brain and has since moved to lead the AI group at Baidu.

I'm looking forward to the rest of the course, I've heard good things.

But firstt ... revision

Its exam season though, which means it's gonna be a while till I can actually do any of this, February most likely.

2016 looks promising. Here's to further self-development, practice and growth.

]]>
<![CDATA[conversation]]>

We have this unfortunate habit called small talk.

When you're with your friends, or at a social gathering, you tend to have a laugh, and talk about a bunch of stuff. Usually though, if you're asked only a few days later what you spoke about, you

]]>
https://yosuf.dev/conversation/6106ee18795dd67e53564531Fri, 18 Dec 2015 19:58:00 GMT

We have this unfortunate habit called small talk.

When you're with your friends, or at a social gathering, you tend to have a laugh, and talk about a bunch of stuff. Usually though, if you're asked only a few days later what you spoke about, you most likely wouldn't remember. That's because your conversation had no significance. It's content matter had no intrinsic value. The other participant(s) did not leave you with anything thought provoking. You did not touch on anything relatively deep.

I've touched upon this before, but we all have interests and passions. When we have conversations though, these are barely articulated. When we don't know the other other person well enough, we default to the lowest common denominator, the weather. Or what course the other person is studying, or where we live. I mean, do you really care? Really? Do we really even know anyone we think we know?

There are far too many people having far too many shallow conversations, and it's unfortunate because of our intellectual capacity. Ideas won't be exchanged and you will not grow if you don't have real conversations. Phatic communication needs to die.

The topic matter almost doesn't matter. Mathematics, cosmology, theology, art, theoretical physics, world war 2, ancient Egypt, cooking. The point is, that it be something you're passionate about. And hopefully informative.

Or maybe that's the problem. Maybe the average person doesn't know what they're passionate about. Do we read enough? Do we read at all? (Personally, i don't think its possible to ever read enough. So many books, such little time. Meh.) Maybe we should spend sometime alone, figuring out what we genuinely care about.

Also, you don't have to talk if you don't have anything to say. Why do so many people feel the need to fill the room with noise? Like chill bruh, silence is okay you know.

The next time you meet someone new though, try and not ask what their name is first. "Soo, what do you do" is another one you should avoid at the beginning of a conversation. Our professions do not define us. I mean, if your meeting has context, say at a tech conference, then sure, you might be wondering what that person does within that context. But if it's a random encounter, try something authentic, that doesn't make the conversation feel scripted.

"If you approached each conversation with the innate curiosity that you normally demonstrate as an infant, how much could you learn if you embraced the unknown, knowing that each person out there can help you become a better version tomorrow, of who you are today."

- Omid Scheybani

We all have stories to share. Be authentically interested in the people you converse with. Not with regards to their shallow attributes, but with regards to what they have to say.

]]>
<![CDATA[Work-Based Project: The Beginning]]>

I'm due to begin my Work Based project in a couple of months, once my January exams are done, where I have to build something for my employer as part of my degree. Though I have an idea of what the project will be on, I'm

]]>
https://yosuf.dev/work-based-project-the-beginning/6106eb7a795dd67e5356451dTue, 01 Dec 2015 19:46:00 GMT

I'm due to begin my Work Based project in a couple of months, once my January exams are done, where I have to build something for my employer as part of my degree. Though I have an idea of what the project will be on, I'm yet to formally agree with my manager on it and submit my proposal to the module leader. What I do know though, is that it will be web based. Which means, getting back into JavaScript.

I like JavaScript, I just haven't used it for a while and need a good refresh. I've been planning on getting back into JS for a while so this will just give me a great opportunity without having to actually use time outside of my studies to learn it, which I've been doing for Android development, since it'll technically contribute to one of my modules.

I'm also going to need a server-side scripting language, and initially, I settled on PHP. Its what I knew. But then I considered the fact that I was planning on getting into Python as soon as (this initially meant after this project) as my go to scripting language. Since practice makes perfect, it made sense to just get into Python now, to use this project as an opportunity to get good at it, and then use it thereafter for whatever.

I've been using Udacity's Android development course recently, which they co-created with Google, and it's gone really well. Though I enjoy the platform, my Android adventures are currently on hold, while I get my hands dirty with web development. I prefer playing with the back end. But being a bit of a perfectionist, especially when it comes to design, I thought I'd start with their Front End Dev courses. So far, they seem very promising.

]]>