{"@attributes":{"version":"2.0"},"channel":{"title":"Matt's Dev Blog - Programming","link":"https:\/\/mattsegal.dev\/","description":{},"lastBuildDate":"Tue, 03 May 2022 12:00:00 +1000","item":[{"title":"How I hunt down (and fix) errors in production","link":"https:\/\/mattsegal.dev\/prod-bug-hunt.html","description":"<p>Once you\u2019ve deployed your web app to prod there is a moment of satisfaction: a brief respite where you can reflect on your hard work. You sit, adoringly refreshing the homepage of www.mysite.com to watch it load over and over. It\u2019s beautiful, perfect, timeless. A glittering \u2026<\/p>","pubDate":"Tue, 03 May 2022 12:00:00 +1000","guid":"tag:mattsegal.dev,2022-05-03:\/prod-bug-hunt.html","category":"Programming"},{"title":"DevOps in academic research","link":"https:\/\/mattsegal.dev\/devops-academic-research.html","description":"<p>I'd like to share some things I've learned and done in the 18 months I worked as a \"Research DevOps Specialist\" for a team of infectious disease <a href=\"https:\/\/www.bmj.com\/about-bmj\/resources-readers\/publications\/epidemiology-uninitiated\/1-what-epidemiology\">epidemiologists<\/a>.\nPrior to this job I'd worked as a web developer for four years and I'd found that the day-to-day had become quite \u2026<\/p>","pubDate":"Sun, 21 Nov 2021 12:00:00 +1100","guid":"tag:mattsegal.dev,2021-11-21:\/devops-academic-research.html","category":"Programming"},{"title":"How to compress images for a webpage","link":"https:\/\/mattsegal.dev\/webpage-image-compressiom.html","description":"<p>Often when you're creating a website, a client or designer will provide you with large images that are 2-5MB in size and thousands of pixels wide.\nThe large file size of these images will make them slow to load on your webpage, making it seem slow and broken<\/p>\n<p>This video \u2026<\/p>","pubDate":"Fri, 14 May 2021 12:00:00 +1000","guid":"tag:mattsegal.dev,2021-05-14:\/webpage-image-compressiom.html","category":"Programming"},{"title":"How to highlight unused Python variables in VS Code","link":"https:\/\/mattsegal.dev\/pylance-vscode.html","description":"<p>I make a lot of stupid mistakes when I'm working on Python code. I tend to:<\/p>\n<ul>\n<li>make typos in variable names<\/li>\n<li>accidently delete a variable that's used somewhere else<\/li>\n<li>leave unused variables lying around when they should be deleted<\/li>\n<\/ul>\n<p>It's easy to accidentally create code like in the image below \u2026<\/p>","pubDate":"Fri, 09 Oct 2020 12:00:00 +1100","guid":"tag:mattsegal.dev,2020-10-09:\/pylance-vscode.html","category":"Programming"},{"title":"There's no one right way to test your code","link":"https:\/\/mattsegal.dev\/alternate-test-styles.html","description":"<p>Today I read a Reddit thread where a beginner was stumbling over themself, apologizing for writing tests the \"wrong way\":<\/p>\n<blockquote>\n<p>I'm now writing some unit tests ... I know that the correct way would be to write tests first and then the code, but unfortunately it had to be done this \u2026<\/p><\/blockquote>","pubDate":"Sat, 11 Jul 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-07-11:\/alternate-test-styles.html","category":"Programming"},{"title":"How to polish your GitHub projects when you're looking for a job","link":"https:\/\/mattsegal.dev\/github-resume-polish.html","description":"<p>When you're going for your first programming job, you don't have any work experience or references to show that you can write code. You might not even have a relevant degree (I didn't). What you <em>can<\/em> do is write some code and throw it up on GitHub to demonstrate to \u2026<\/p>","pubDate":"Wed, 17 Jun 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-06-17:\/github-resume-polish.html","category":"Programming"},{"title":"Studying programming: where to start","link":"https:\/\/mattsegal.dev\/self-study-starting.html","description":"<p>You have zero programming knowledge and you want to start learning to code.\nWhere do you start?<\/p>\n<p>Maybe you want to learn enough to get yourself a coding job, or you're planning to study computer science in the future and you\nwant to try it out before you start your \u2026<\/p>","pubDate":"Sat, 16 May 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-05-16:\/self-study-starting.html","category":"Programming"},{"title":"Studying programming: pace yourself","link":"https:\/\/mattsegal.dev\/self-study-pacing.html","description":"<p>You can learn programming all by yourself and get a coding job. Just you, your laptop and the internet.\nIt's great! You don't have to pay thousands of dollars for a degree and you can work at your own pace.<\/p>\n<p>There's a problem with this approach though: with no teacher \u2026<\/p>","pubDate":"Fri, 15 May 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-05-15:\/self-study-pacing.html","category":"Programming"},{"title":"Studying programming: tools or theory?","link":"https:\/\/mattsegal.dev\/self-study-tools-vs-concepts.html","description":"<p>When you're studying web development you have a lot to learn and limited time.\nOne of the hard choices that you'll need to make is whether you learn tools or concepts.\nShould you study data structures and algorithms to be a web developer?\nIt seems kind of esoteric.\nDo you \u2026<\/p>","pubDate":"Sun, 10 May 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-05-10:\/self-study-tools-vs-concepts.html","category":"Programming"},{"title":"Studying programming: what to learn next?","link":"https:\/\/mattsegal.dev\/self-study-mindset-enthusiasm.html","description":"<p>A lot of people trying to teach themselves programming have an anxiety\nabout what they should be learning. There is an endless array\nof options - you've seen these ridiculous <a href=\"https:\/\/github.com\/prakhar1989\/awesome-courses\">lists of online courses<\/a>, right?\nThere's too much to learn and not enough time! You don't want to waste time learning \u2026<\/p>","pubDate":"Fri, 08 May 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-05-08:\/self-study-mindset-enthusiasm.html","category":"Programming"},{"title":"Keeping your config files valid with Python","link":"https:\/\/mattsegal.dev\/cerberus-config-validation.html","description":"<p>It's common to use a config file for your Python projects:\nsome sort of JSON or YAML document that defines how you program behaves. Something like this:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"c1\"># my-config.yaml<\/span><span class=\"w\"><\/span>\n<span class=\"nt\">num_iters<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\">30<\/span><span class=\"w\"><\/span>\n<span class=\"nt\">population_size<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\">20000<\/span><span class=\"w\"><\/span>\n<span class=\"nt\">cycle_type<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s\">&quot;long&quot;<\/span><span class=\"w\"><\/span>\n<span class=\"nt\">use_gpu<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\">true<\/span><span class=\"w\"><\/span>\n<span class=\"nt\">plots<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p p-Indicator\">[<\/span><span class=\"nv\">population<\/span><span class=\"p p-Indicator\">,<\/span><span class=\"w\"> <\/span><span class=\"nv\">infections<\/span><span class=\"p p-Indicator\">,<\/span><span class=\"w\"> <\/span><span class=\"nv\">cost<\/span><span class=\"p p-Indicator\">]<\/span><span class=\"w\"><\/span>\n<\/code><\/pre><\/div>\n\n<p>Storing config in a file \u2026<\/p>","pubDate":"Sun, 03 May 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-05-03:\/cerberus-config-validation.html","category":"Programming"},{"title":"8 helpful tools for programming on Windows","link":"https:\/\/mattsegal.dev\/windows-setup-programming.html","description":"<p>Software development on Windows can be a pain. Not because of any issues with C#, .NET\nor the operating system, but simply because the tools surrounding your work can be quite clunky by default.\nI'm talking about the lack of a package manager, PowerShell's ugly blue terminal with no tabs \u2026<\/p>","pubDate":"Sat, 02 May 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-05-02:\/windows-setup-programming.html","category":"Programming"},{"title":"Run your Python unit tests via GitHub actions","link":"https:\/\/mattsegal.dev\/pytest-on-github-actions.html","description":"<p>You've written some unit tests for your Python app. Good for you! There are dozens of us, dozens!\nYou don't always remember to run your tests, or worse, your colleagues don't always remember to run them.<\/p>\n<p>Wouldn't it be nice to automatically run unit tests on every commit to GitHub \u2026<\/p>","pubDate":"Mon, 27 Apr 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-04-27:\/pytest-on-github-actions.html","category":"Programming"},{"title":"Never think about Python formatting again","link":"https:\/\/mattsegal.dev\/python-formatting-with-black.html","description":"<p>At some point you realise that formatting your Python code is important.\nYou want your code to be readable, but what's the <em>right<\/em> way to format it?\nYou recognise that it's much harder to read this:<\/p>\n<div class=\"highlight\"><pre><span><\/span><code><span class=\"n\">some_things<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"s2\">&quot;carrots&quot;<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span><span class=\"mi\">2<\/span> <span class=\"p\">],<\/span>\n<span class=\"s2\">&quot;apples&quot;<\/span><span class=\"p\">:[<\/span>\n<span class=\"mi\">3<\/span><span class=\"p\">,<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">3<\/span>\n<span class=\"p\">],<\/span> <span class=\"s2\">&quot;pears&quot;<\/span><span class=\"p\">:<\/span> <span class=\"p\">[]<\/span> <span class=\"p\">}<\/span>\n<\/code><\/pre><\/div>\n\n<p>than it is to \u2026<\/p>","pubDate":"Fri, 24 Apr 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-04-24:\/python-formatting-with-black.html","category":"Programming"},{"title":"Nand to Tetris is a great course","link":"https:\/\/mattsegal.dev\/nand-to-tetris.html","description":"<p>Everyone who learns programming at some point stops and asks - how does this actually work?\nYou might know how to write and run code, but <em>what's actually happening inside the computer<\/em>?\nIt can seem unfathomable.<\/p>\n<p>Some people don't care about what's happening under the hood. Their code works, it gets \u2026<\/p>","pubDate":"Fri, 17 Apr 2020 12:00:00 +1000","guid":"tag:mattsegal.dev,2020-04-17:\/nand-to-tetris.html","category":"Programming"}]}}