Posts

Showing posts from May, 2024

Born In The Fire

Image
Born In The Fire One of my favourite quotes is from the opening lines of "Best I Ever Had" by Laurel. "Born in fire/ Golden waves upon the shore can't calm us/ Burn on the beaches we won." I was born with a passion. Or rather I was born to have a passion. And later I found it so much. How do I focus on things I constantly need to be reminded of my goals again and again. I constantly need to be protected and taken away from distractions. So what am I going to do about this How am I going to do this I struggle a lot with remembering what my main goals are if I have a lot going on at once. This is why I like to always keep things streamlined, and really simple. WRITING ALL MY GOALS DOWN AT FIRST The first thing I have been struggling to do, and maybe this is REALLY REALLY SIMPLE, is just using a pen and paper. I NEED to write down what my goals are every day at the start of the morning. I need to write down what my goals are, and what I am focusing on. I took a fab

Magic Methods

Image
Magic Methods So by a super cool and awesome and really amazing developer who I work with sometimes, I have been set the task of trying to figure out how we would go about sorting two instances of the same class - based on the value of one of their attributes. magic methods - taylor swift folklore aesthetic and vibe So what are magic methods? Magic methods are "special methods describing how certain objects should behave." They are "dunder methods" (sounds like something out of a fantasy novel?) like __init__ , __repr__ and __lt__ . I came across these when I was first learning Python/Django for my job interview. These methods apparently indicate that these methods "shouldn't be called directly by the programmer, they are normally called by the interpreter itself." Source:  https://blog.cambridgespark.com/magic-methods-a8d93dc55012 There is a thing called __new__ that comes before the __init__ method, but we are not going into this today. I am not g

Lambda Functions

Image
Lambda Functions  11 pm. I'm on the train home from London, having met up with my little sis. Should I do some work? No I don't work at this time. Should I read? I can't at this time. I know. I'll learn some AI. So currently I am taking two foundational modules that my AI engineer colleagues have recommended. Then I can do the full AI/ML career path.  A wind farm in Cornwall that my wonderful sister sent me. Lambda Functions for Pandas "Learn to define a Python function in one line."... Sounds like JavaScript. Which I miss. Only because I love it so much - don't remind me. I miss it every day. Anyway I love Python too...  So this is my attempt at writing a lambda function: age_in_dog_years = lambda age: age * 7 And this is attempt number two: say_hi = lambda name: print('Hi ' + name) Okay not so bad for someone who is writing at midnight on the train on the train from London for today having worked all day. An if statement inside of a lambda functi

Alan Turing's Legacy, Part VII

Image
Alan Turing's Legacy, Part VII I have run out of AT pictures - maybe one of his memorial - but I want to keep sticking to the titles. My next plan was to use pictures of wind farms in Luxembourg, where I am from, so here we go. Using TypedDict So this was my second homework assignment that was set to me by my incredible mentor. I am so so lucky.  I have the most incredible mentorship.  I have the best mentors in the world! And so one of them has set me a task to learn what TypedDict is  And so that means I need to read again - arrrgh. Luckily my lead and I have spent a bit more time on this today so I have some context. But I still need more - hey I wonder if I covered it in my Codecademy course. It's so obvious, please - DUH It does exactly what my Lead has said to me that it does, based on the conversation that we had this morning. So why was I worrying about it so much? From Dafoster (???!) https://dafoster.net/projects/typeddict/ "A TypedDict is a new kind of type reco

What is the enum library, part II?

Image
What is the enum library, part II? I wanted to do a bit more on this - sorry please, thank you. I wanted to do a bit more practical examples. A cute little octopus. Testing out enum code Is there anything else here, that I can take away from this? Is there anything else I have learned here? why meta? I asked chat GPT but it didn't make much sense. It's just a type of enum class I guess? One more interesting source... Here is one more interesting link... Source:  https://www.python-engineer.com/posts/enums-python/ It says here that: "Enum is a built-in data type in Python. It is used to create a finite set of constants." "Enum is a collection of symbolic names and values. It's a shortcut for enumeration and can be imported from the module enum . Enumerations are created using classes." So to give more examples I played around with it some more And I think I've got the idea now - thank you... Thank you.

What is the enum library?

Image
What is the enum library? So what is the enum library in Python, please? A senior colleague and wonderful wonderful mentor has asked me to research this. Specifically, he would like me to understand, in my codebase, why one of my classes is a TextChoices class. To give it a bit more context So my colleague has asked me to research the Python "standard library module named enum ". And he says that Django has enum stalled classes called: TextChoices and IntegerChoices And so he has asked me to research the enum module library... What is the enum module library? I am watching a 5 minute video... I know... due to my neurodiversity I often struggle to watch videos beyond two minutes. But I am DESPERATE for an intro and I need to do it alone... so it's easier than reading it. BLERGH. Why are videos so long and hard to watch. Just get me to the point please already. I lasted about 1 minute and 30 seconds Okay so that is... already longer than I last in most videos anyway. Enum

I have to refocus my priorities

Image
I have to refocus my priorities I have to refocus my priorities. I have to leave the AI for now. I will do it after work again once the time is right or whatever. But for now I just really need to focus ON MY JOB. In my job I am moving off a project I was sort of working on - the best direction is for me to focus on working on, understanding, and maintaining my current codebase. In that sense: I have my tips which I shared in my infographics and in this blog post (on my other blog) yesterday. And so: My main focus has to be just really focusing on my own codebase. I have to GO THROUGH EVERY FILE, THAT IS RELEVANT IN THE CODEBASE FOR EVERY LINE I HAVE TO GO LINE BY LINE AND WRITE COMMENTS FOR EVERY LINE. I HAVE TO UNDERSTAND THE CODEBASE FILE BY FILE FUNCTION BY FUNCTION LINE BY LINE AND THAT HAS TO BE MY PRIORITY AND THAT HAS TO BE MY FOCUS AND THAT HAS TO BE HOW I APPROACH THIS, AND I CAN DO COURSES TOO ON THE SIDE BUT I MIGHT NOT HAVE TIME /TOO MUCH TIME/ BE ABLE TO MAKE IT MY TOP P

Alan Turing's Legacy, Part VI

Image
Alan Turing's Legacy, Part VI I have spoken to my Lead and we have a plan going forwards. We have streamlined the Django course - I am only going to do the first 5 modules. That way I can focus on what is most relevant. But - here is the plan that he has given me in terms of getting to know my Codebase (why have I forgotten everything - 5 pm brain - omg). Going through the Codebase and only focusing on the most important files. I know what these are but of course these are highly confidential so I will put them in a notion doc instead. I have them written down in the back of my notebook. I will write them all down in a notion doc. Going through those files and IDENTIFYING THE KEY FUNCTIONALITY - WHAT DOES THE CODE DO - WHAT IS THE PURPOSE OF EACH FUNCTION. WHAT IS THE CODE'S FUNCTION. And then based upon this, I have some tasks Go through the code and write comments in the code As many comments in the code as I need I do not necessarily need to push them - I can see how that go

Alan Turing's Legacy, Part V

Image
Alan Turing's Legacy, Part V He would just do it. He would just do the thing. He would just do the Django... He would explore it - with a scientific and inquisitive mind...  What is Django? Django is a web development framework - it allows you to easily create web apps using less code and with a lot of "batteries included" stuff - a lot of the stuff involved that you need is already included in it. For example... for example what? An authentication system... MTV Django is an MTV Framework.  MTV stands for: MODELS TEMPLATES VIEWS. Models: deals with data and databases - can RETRIEVE, STORE AND CHANGE DATA IN A DATABASE. Templates: DETERMINES HOW THE DATA LOOKS ON A WEB PAGE IE HTML AND CSS STUFF IE PRESENTATION Views: describes the data to be presented, and passes this information to the template. There is more to say on this lesson but I have to write up something else. I will come back to another lesson on this blog posts please. THANK YOU!!!

What would Alan Turing do?

Image
What would Alan Turing do? Do some AI courses. Learn some AI. I mean he would've written the AI courses. He would've created the AI. He DID create the AI. He was the further of AI. But what would he have done if he was me? He would do the AI courses, I guess. Outside of work. And he would continue with Django, a tiny bit of Python, and getting up to speed with me repo for now unless I am pulled onto another project which I can't talk about. I am still waiting to see how I can be of use for that. Ladies and gentlemen: My new desktop background. Hopefully forever... Or at least as long as I am in this job. Django Instead of eating toasties and wondering about what he should be doing... Alan Turing would be doing it. He would be doing the Django. Ahem so... Let's GO!!!

American Beauty

Image
American Beauty I often listen to the main theme of American Beauty while I am coding or doing stuff. It is just so so so so beautiful. I am also listening to "Miracle Machine" by Blind Guardian right now. I like Blind Guardian's ballads - magical, fairytalelike, totally magical. Like fairytales. Perfect. Perfection. We Must Believe In Something That I Would Call A Miracle I have been trying to understand GROUP BY and HAVING this morning. I think that I have gotten them, so it's time to move on. A MIRACLE MACHINE But of course, here I am reminded of "The Book of Miracles". A book I found at the first JavaScript meet up I ever went to. NOW LET ME TAKE YOU TO THE OTHER SIDE "In order to efficiently store data, we often spread related information across multiple tables." Why use multiple tables To avoiding repeating multiple pieces of information multiple times. For example, we might have multiple students and multiple classes - but how might be mod

Alan Turing's Legacy, Part IV

Image
Alan Turing's Legacy, Part IV I can't always commit to everything.  I can't commit to anything, really. I tried to commit always working in renewable energy, but that didn't work out. I now work for water tech, but in a renewable energy firm. That was where they placed me, that was where it had to work out. That was where I'm meant to be. I'd like to commit to growth but growth is not always within my control. The rate of growth is sometimes outside of my control. Sometimes rapid growth can be the result of hidden invisible growth over time. I'd like to commit to being a staff engineer but I can't. That is what I want to do, but what if it isn't right? What if it doesn't work out? What if it isn't meant for me? I'd like to try and do it anyway. But I can commit to writing. I can commit to learning about stuff and writing about it. I can commit to learning at work and writing about it. On here and on LinkedIn too. I can commit to writing t

Alan Turing's Legacy, Part III

Image
Alan Turing's Legacy, Part III Another day. I'm still watching The Imitation Game. I'm still doing SQL on my weekend/bank holiday. It doesn't feel right to be doing this but I'm hoping this is the last or penultimate time. I just really need to get up to speed with my work. But in future I don't plan to spend my weekend doing courses I have to do for work. I don't really exactly know what the plan is. Thank you. But I just know that I need to get a win under my belt - and working at work can be distracting. Aggregate Functions "SQL queries don't just access raw data, they can also perform calculations on the raw data to answer specific data questions." "Calculations performed on multiple rows of a table are called AGGREGATES." The Imitation Game I finished the imitation game and I cried my face off. I avoided it for nearly a decade (re-watching it) because that final closing scene was so sad. I watched it this time but I cried so much

Alan Turing's Legacy, Part II

Image
Alan Turing's Legacy, Part II Yesterday night I read a children's book about Alan Turing while in Foyles. I also walked round London late at night listening to music from The Imitation Game 's soundtrack. I thought about him and wondered if he'd walked down the same exact streets of London. I'm sure Alan Turing wouldn't have found SQL difficult. He would've just got on with it and stuff. The * selects every column from the table DELETE FROM deletes from a table. INSERT adds a new row into a table - and so, a new INSTANCE of something - a new object, like. NULL is missing or unknown data. Continuing on the next day I am working on a weekend and bank holiday cos I need to learn SQL ASAP. I have been reading this amazing piece and am crying of course - " Alan Turing's legacy in troubled times. " My topic for today's lesson is QUERIES "Suppose we are only interested in two columns. We can select individual columns by their names (separated

Alan Turing's Legacy

Image
Alan Turing's Legacy Alan Turing's Legacy is the name of a song from The Imitation Game 's soundtrack. But it is also just true that his legacy still lives on. I remember him every day. Last night, when I was buying computer science books in Foyles in London, I felt that he was with me. I think it's true because I ended up in the WWII section while I was choosing them. I feel that he is with me as I choose to learn AI. In fact I feel that maybe he is the one who is telling me to do it. I feel that this is what he would've wanted me to do. Learning SQL I have started this course 3 times and now the joke's over. I need to get on with this for work and also I love it and I just want to learn. But now it's the time. ALTER TABLE The ALTER TABLE statement "adds a new column to the table." ALTER TABLE programmers ADD COLUMN favourite_programming_languages TEXT; PRIMARY KEY PRIMARY KEY columns can be used to uniquely identify the row. It means that if we