Category: Apprenticeship rss

Posts

I’ve missed the last two blogging days, but for good reasons I swear. As the title suggests, I’ve changed gears in this apprenticeship. I’ve realised recently that I’m right about in the middle of the programme and, not including this week, I have about nine weeks left as I’m going on holiday as well. This means that I have to start preparing for the next phase, which is the “masterpiece” project.
Okay I said I would do an example of Markov Chains today but I’ve pushed that to tomorrow (or possibly Monday) as this is something that’s been in my backlog for some time and I would like a chance to do it. So, on to tmux. tmux is a terminal multiplexer for Unix-like OS’s (like MacOS!) and allows multiple terminal sessions to be accessed simultaneously in one window. I constantly have five terminal tabs plus two or three windows open so this would probably be useful for me to get into, despite me being a tab-switching expert by now.
The other day I told the apprentices about working with Markov chains so I thought I would write a bit about it because I think they’re quite a powerful concept (and I do love my finite state automata). As your resident, self-proclaimed non-expert on random subjects, I shall do the honour of attempting to explain this. So let’s get it to it. A Markov chain is a stochastic model, i.
Technically, one could argue that every week is a week with data in this industry. But I really mean my week with the respective teams dealing with the actual data that others teams in the company consume. From what I learned - and correct me if I’m wrong - there are the data scientists, the data engineers, and the data analysts. I will refer to them collectively, probably without their knowledge, as the data senseis.
From 16 - 18 November, I participated in a student hackathon hosted by TUM. Well, I didn’t really participate as much as I mentored. After my second or third year of uni, I started joining hackathons as a mentor rather than a participant, just because I knew how important it was to share knowledge and help the students who were just starting out (not that I was always the more experience one of anything).
This will be a two-day post, as I spent a majority of the first day testing out different components of example projects in the Play Framework. I think that I kind of get it, at least the basics of it (and maybe a bit more). I’m still a bit of a way from writing a RESTful API but hopefully I’ll be able to get something this week. Twirl Templates For the “view” portion of this MVC, Play comes with a Scala-based template engine that is supposed to be compact and easy to learn (my favourites).
Yesterday I spoke about a project I wanted to revive using the Play framework for Scala and so today I’ll be going through the basics via the started pack that was provided by the documentation. Overview What is Play? It’s a full-stack framework with all the components to build a web service or, in our case, a REST API. Some of the components involve an integrated HTTP server, form handling, Cross-Site Request Forgery (CSRF) protection, a powerful routing mechanism, I18n support, and a lot more that I cannot list here.
Back in 2016, during my second year of university I attended a 36-hour hackathon in Manchester (I went to a lot of hackathons during my days as a CS student). During those 36 hours, I and one of my fellow informatics classmates (i.e. my boyfriend) decided that we wouldn’t really focus on the given challenges by the different sponsors but instead do something of our own (because why not?).
I’ve been putting off this chapter in my red book but today, I’m just going to suck it up and get through it. I’ve decided to blog about it hoping that it’ll be more fun. So… let’s get it to it, man. This chapter is all about creating functional APIs, i.e. API’s that will not produce any sort of side effect. It sounds a bit difficult but it’s life-changing (hopefully).
I’ve realised I’ve made a grave mistake. Last week or so I’ve been focusing on promises and futures in Scala, which was, of course, the entire purpose of those posts. I shouldn’t have isolated my research in just Scala because they’re not concepts that are unique to this language! Therefore, today I’ll be going over an example of Promises in JavaScript (the OG in my journey of concurrency). Anyway, with a combination of knowledge from some more experienced developers and a lot of Googling, let’s see what we come up with.
As I mentioned, another month has quickly passed by so it’s time to reflect on what’s happened, what’s currently happening, and all the sorts. Due to the week I missed from a terrible cold, it actually hasn’t been too long since my last reflection. However, I can say that quite a bit has changed and developed so I will write one anyway. The Good Firstly, let’s talk about how everything is going with Scala.
This is a short introduction to Docker, a computer program that performs OS-level virtualisation called containerisation and is used to run packages fittingly called containers. Overview of Containers So what is a container exactly? According to the Docker documentation, a container is a “standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.” In other words, a container is a standalone executable package of software that includes everything needed to run an application (e.
Today is officially the start of my third month as an apprentice, and the third phase: The Business Phase. During this phase, I should gain an understanding of the most important parts of HolidayCheck. Therefore I get to join different departments and join them for a week or two. Therefore I need to plan a bit on what I’ll do for the next two months. So, I have eight weeks, maybe seven if I take the time to plan this week.
After some helpful tips and explanations from more experienced developers, I was going to continue with concurrency in Scala and the differences between Promise and Future but it’s Friday and I wanted something more fun (in between watching the Coursera Week 6 videos, not that that isn’t incredibly fun). So I spent the day doing some more Scala exercises (functionally) on exercism and hackerrank. I was going to do some leetcode as well but didn’t get around to is as I tried to improve each of the exercises, no matter how simple they were.
I was going to continue writing about sorting algorithms today, but I’ve been working on my blog this whole day. As you’ve probably noticed, I’ve finally changed my theme, something I’ve been wanting to do for a while and I’m a lot happier with it. There’s a few bugs that I still have to squash but I’m quite happy with my progress for today. One of the bugs includes code blocks.
Yesterday I spoke a bit about the basics of Future and mentioned that there was something similar called Promise. The differences between these two are a bit vague for me at the moment so I’ll get into what a Promise is first before going into some contrasting. Promises In the Scala documentation, a Promise is an object that can be completed with a value or failed with and exception.
I realised that I do have a lot of these “introduction to x, y, z” posts but, well, here’s another concerning Scala and concurrency. To be fair, this is somewhat on topic to the Akka HTTP stuff I wrote about sometime last week. Also, the seventh chapter of the red book is about functional concurrency so, since I was slightly confused during the reading, I though it would be best to start off with a new post about how Scala treats concurrency.
Today is Friday and I spent most of it finishing Week 5 of the Coursera course, meaning that I only have one week left! At least that’s what I hope. There’s a possibility there’s actually a Week 7 I didn’t notice. Nonetheless, Week 5 was mostly about lists, and as I mentioned yesterday, a sorting algorithm or two. Week 6, which I had just started, is all about collections, so maps, vectors, etc.
Today, I’m deviating from my “normal” because it’s been a bit of a strange week anyway since I switched from Scrum to Kanban. I was continuing my FP in Scala course on Coursera and we got to sorting algorithm, mostly insertion sort and merge sort. And I thought… It’s been quite some time since I’ve touched upon sorting algorithm and, thus, this blog post is born. Maybe this will be at some point relevant, or maybe not, but it’s something I’m interested in so vamos.
Today I ended up breaking my blog trying to integrate some RSS capability, so this will be a very short post (also because my last few ones were so long). I added an rss.xml file to my theme’s layout folder, which was actually a lot more difficult that I had intended. The way I had set up my theme was using a submodule connected to the original git repository, and because of that I couldn’t really edit it.
Notice how I said my introduction to Akka HTTP… because I know nothing about it except for the bits that I’ve learned from some lightning talks by developers in the company. So I’m spending my time today getting to know Akka HTTP. I probably won’t explore it in a sense that I’ll try to write a a mini program of sorts (like simple “Hello World” type), but rather just collect my general thoughts about it based on multiple sources, including the Akka documentation itself.
There’s really not much to write about today as I spent most of it practicing Scala, which I actually haven’t done in a while. I do the course on Coursera and I read the red book, and I do the exercises for both but sometimes I just want to spend some time looking at the functionality of the different collections in Scala. Therefore, that’s what I did today. Well, actually I mostly practices map, filter, fold, and reduce, which I had read about and did a bit of practice when I did, but didn’t get a chance to actually practice it more.
A little while back I began thinking about what we apprentices could do to feel more like a team and after doing some research on mob programming, I thought that it would be a perfect idea. There’s a lot of pair programming that goes on in this company, at least from what I’ve observed, and so I thought this would not only make us feel more like a team but also improve our communication skills.
I’ve started thinking about how I’m currently organising my tasks and such, and realised that I’m not sure if it’s working all to well for me. Recall that I’m doing some sort of scrum-y type approach where I have two-week sprints, sprint planning, retrospectives, and all relevant scrum ceremonies. This approached worked when I was working on one large project (or in a team working on one large project), but it’s not really working for me now.
Yesterday, I went through the basics of abstraction with a few examples. Today I’ll try to go into a bit more depth about it, and hopefully tie it into Scala as I am only aware about how it works in Java. Though you can also declare Scala classes as abstract and data abstraction works similarly (e.g. Lists). I’ll focus a bit more on control abstraction, as I didn’t speak much about it yesterday.
Today I’ll be writing about the basics about the concept of abstraction, which not to be confused with encapsulation. I will not go into encapsulation in this post, but most probably in the next one or next next one, as it is a similar concept but still quite different in more depth. Abstraction, in short, is the concept of representing something at a higher level with the purpose of leaving out unnecessary details.
Although the end of my first month as an apprentice was actually a few weeks ago, I realised that I have yet to properly reflect on my time here. So better late than never, I guess. The Good Let’s start off with the good, which is a majority of what I have to say anyway. Firstly, there’s the people and the environment. Since it’s a much smaller company than the previous one I worked in, I see the same faces every day and it’s easier to greet them and have a quick chat about their day.
I’ve been very technical this week in terms of my blog posts and what I’ve been working on so today, I’m going to take a break from talking about it all (although I’m still mostly working on Ensime/Vim/Scala but a bit less today despite having my necessary Scala break yesterday). Instead, I’ll write about - I don’t know - books or something. For this apprenticeship, I’ve been reading The Software Crafter and it’s quite interesting in some ways.
I started implementing my minimax algorithm for my TicTacToe game, however after writing some test cases, I decided I needed my weekly Scala break (and yes, that’s a thing and sometimes it’s bi-weekly just because). So I started looking more into mob programming. I did do a bit of research on it yesterday, but went more into depth today and looked at some rules. First things first, mob programming is a software development process that involves a whole team working on the same thing on the same computer.
So my Scala and Vim chronicles continue today, though I didn’t actually struggle too much I would say, so this is just called the “Continuance” of my experience. Now that I’m getting more and more used to Vim, I actually really like it as a text editor. It’s so lightweight so it doesn’t kill my laptop whenever I’m editing something. And I’ve learned enough commands to be able to program Scala without any problems.
In my quest to try to integrate Scala with Vim*, I may have succeeded. I had quite a bit of problems with installing the ensime-vim plug-in because my Vim didn’t support python3 and so it was causing all sorts of problems. I also had some strange permission issues with some folders that needed some write-access (which I theoretically should have had to begin with). Luckily with some - or rather, a lot - of help, I was able to successfully install it on Vim.
After being gone for most of last week, I’ve lost a bit of momentum on what I’ve been doing. I’m supposed to start a new sprint today, however, I haven’t actually planned it. Though I do have an idea of what I would like to do these next to weeks, but pretty much all of that includes Scala. As I want a more well-rounded sprint (and also because I don’t want to just do Scala all day, every day) I’m looking into some suggestions of what I can work on.
I’m playing a bit of catch-up today as I’ve been sick for the past several days. To be fair, I’m still a bit sick today… but I’m pushing through it for the time being. Anyway, as I said, I’m just spending most of the day catching up so I’ve been reading the Software Crafter as I’ve been a bit behind on that anyway. I’m just through chapter 6 and have started chapter 7, which I’ll soon discuss with the other apprentices.
26 September / / Apprenticeship
So I’ve finished the most simple of implementations of my TicTacToe project. As I mentioned yesterday, I’m saving some sprucing up for the next sprint including some sort of implementation of minimax. My current implementation doesn’t have much input checking so if a user inputs a board size of “f” or something then it’ll complain but if it’s, say, a board size of -3 it won’t. I’ll probably just have to catch that exception and ask the user to re-input a more valid number.
25 September / / Apprenticeship
Using the site that was recommended to me called CodeTriage, I’ve been attempting to find a good open source project to contribute to. With three days left in my sprint, it seems I may have to continue the search during my next sprint. I guess I’m just having some trouble finding a project that has some “beginner friendly” issues that are open. Well, I’ve found some but I just haven’t found any that doesn’t involve knowing the ins and outs of the entire codebase, which in most cases are quite large.
24 September / / Apprenticeship
I’m writing this right now in Vim, which is actually one of the tools that I wanted to improve on during my time in this apprenticeship. With just my first day, I’ve realised just how little I actually new about Vim. These days, I mostly use it to write a simple bash script or to write my gitignore’s. In university, I used Vim whenever I ssh-ed into my university account or the computing cluster to run some CNN’s and such.
21 September / / Apprenticeship
When I first started Scala, I was actually a bit surprised to learn that it doesn’t have any switch statements like in Java, JavaScript, etc, but rather uses something called pattern matching. Just hearing the words made me think of regex but, it was actually just a way to check a value against a pattern. Now that I write that, it really does sound a bit like regex… but the difference would be that the expression used (the pattern) is actually readable and not an assortment of seemingly haphazard punctiations and letters.
20 September / / Apprenticeship
I’ve continued the “Functional Programming Principles in Scala” course (let’s just call it FPP for short) and I’ve managed to finish the first week’s videos, though mostly because half of the videos was how to set up sbt and IntelliJ and etc. I would say that I do enjoy the course, though I can see it being incredibly theoretical. It is a university course. His very dry tone of voice actually reminds me of some of my old courses… Anyway, I’ll tackle the programming assignment sometime tomorrow or next week.
19 September / / Apprenticeship
Remember that solution from yesterday? def foldRightFL2[A, B](list: List[A], z: B)(f: (A, B) => B): B = foldLeft(list, (b:B) => b)((g, a) => (b) => g(f(a, b)))(z) I have to admit that IntelliJ helped me a lot to get to that solution because it kept giving me an error whenever I was going the wrong direction, e.g Type mismatch, expected: (B => B, A) => B => B, actual: (B => B, A) => B => Any And I just thought, “oh, it’s the wrong output type” and thought about how I can get the proper argument I need to make this work, which was the reason it had taken me ages.
18 September / / Apprenticeship
I didn’t get a chance to start my TicTacToe mini-project today as I had originally planned but I guesss that’s why I planned for two-week sprints rather than one-week sprints. I actually spent a bit too much time going through exercises in the red book and I was stuck on one of the “hard” problems, which involved implementing a foldRight function using foldLeft and vice versa. Actually, let me give a bit of background:
17 September / / Apprenticeship
(Get it? Because the guy’s name is Haskell Curry…) I dove right into more functional programming today via the book I had mentioned in my previous blog. Let’s call it the red book because it’s red and that’s what it was refered to as when recommended to me. I’m actually gonna scrap the Scala for the Impatient book entirely - or rather just use it as a reference from time to time on very Scala-specific things - because I feel like I would rather invest my time on that single book.
14 September / / Apprenticeship
One of the developers here lent me Functional Programming in Scala earlier today and, although I’ve only read the first chapter, I actually really enjoy it. It’s definitely a lot more technical than Scala for the Impatient but that’s what I was looking for. Of course I’m not just gonna scrap the latter. I’ll read both side-by-side (in a very non-literal sense) because I one of the reasons I wanted to learn Scala in the first place was it’s support for the functional programming paradigm and the last thing I want to do is to just use it as a “better Java”.
13 September / / Apprenticeship
(that took me 17 minutes) Today was a bit of a “business as usual” kind of day. I didn’t actually program as much as I usually do, which was what I had aimed to do because I wanted to spend more time with other topics, such as tooling and system design (this is not really in our curriculum but I’ve always been quite interested in large-scale system design and may add a mini-module about that in my plan).
12 September / / Apprenticeship
I’m fresh out of the CoCoCo (Code, Coffee, and Conversation) and I can say that it was definitely an experience. The topic of discussion today concerened ethical tech, though that, of course, led to a discussion on ethics in general. You can probably guess that that became a heated argument. Rather than regurgitate my views on ethics on this blog, I will, uh, save that for individuals who would like to hear it.
11 September / / Apprenticeship
One of the challenges of this apprenticeship is giving a talk (unfortunately, in front of other people) and I’ve been thinking about what I can give a talk about. It doesn’t have to be a technical topic this time around as it’s the first one of many (probably six). Do I even know a lot about specific topics? I’m not even really sure… Maybe that’s the imposters’ syndrome talking again.
10 September / / Apprenticeship
Week Two has commenced! My goal this week is to mainly plan for my first sprint. Think of it like a week-long sprint planning if that doesn’t sound like a horrible nightmare. As I had mentioned during our daily, I wanted to revisit tic tac toe, which was the project that had gotten me here in the first place. I had written it in Java with a dynamic board size and implementing the minimax theorem so… why not do it in my new language?
07 September / / Apprenticeship
No, that doesn’t work. Happy Friday! Today was a Scala day for me. After taking a look at Haskell and being reminded of all the features of the functional programming paradigm that I enjoyed but have missed out on because of Java, I had decided to look into Scala. According to the Wiki, Scala is supposed to “fix the issues present in Java”. You know how Java can tend to be a bit verbose?
06 September / / Apprenticeship
I highly doubt that pun has not been used before with Go, however I enjoy it so it will stay as my title for today’s post. As the title suggests, I spent a bit more time with Go today, mostly reading a bit too deeply about slices and doing some HackerRank problems. It was mostly just to get the feel of actually writing some basic functions and such, as well as whether or not I would like to choose it as my “new language”.
05 September / / Apprenticeship
My goal of deploying this site has been finally completed! I had spent quite a bit of time trying to figure out why the theme that I was using looked completely different on Netlify only to realise that I had been attempting to set the base url using http instead of https. Typical, right? Nonetheless, I did it. Despite the idea of creating and deploying websites is not a new concept to me, doing it using Hugo and Netlify was.
04 September / / Apprenticeship
As my second day as an apprentice comes to a close, I’ve almost managed to set up this blog locally and not just remotely. Considering this is the first post, I’m not quite sure what I want my overall feel to be just yet so I’m struggling a bit just with that. In terms of the arhitecture of this blog, for the time being I’ve chosen to go with GitHub Pages and using Jekyll.