<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>yourweekly.dev</title><description>learn to code: zero to hired mentoring</description><link>https://yourweekly.dev</link><item><title>The AI-Safe Career 1: Developer Jobs</title><link>https://yourweekly.dev/tasc-1-developer-jobs</link><guid isPermaLink="true">https://yourweekly.dev/tasc-1-developer-jobs</guid><description>Is AI taking Developer Jobs?</description><pubDate>Wed, 20 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When &lt;a href=&quot;https://arxiv.org/abs/2005.14165&quot;&gt;GPT-3 was announced&lt;/a&gt; in May 2020, the world of software development changed forever.&lt;/p&gt;
&lt;p&gt;At least, that’s what several 2025 headlines and big companies are implying[^1].
The reality is that &lt;strong&gt;the perception of the impact of LLMs&lt;/strong&gt; has been &lt;strong&gt;much greater than the actual impact&lt;/strong&gt; of LLMs: they’re complex tools that capture the imagination.&lt;/p&gt;
&lt;p&gt;In this series of articles, we will look at available data and expert analyses[^2] to address the fears and misconceptions, by focusing on &lt;strong&gt;one aspect at a time&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;:::tip[analysis]
Busy readers can find my pragmatic and simplified take-aways in these green “analysis” boxes
:::&lt;/p&gt;
&lt;h1&gt;Is AI taking developer jobs?&lt;/h1&gt;
&lt;p&gt;There&apos;s enough &lt;strong&gt;confusion&lt;/strong&gt; about the &lt;strong&gt;current state of the market&lt;/strong&gt;, that it&apos;s worth addressing as the first topic. Let&apos;s start by dividing the question into smaller ones we can answer more confidently.&lt;/p&gt;
&lt;h2&gt;Are software developer jobs declining?&lt;/h2&gt;
&lt;p&gt;Different data sources have different definitions for software developers, what a job is, and in which location. This gives us &lt;strong&gt;an idea of general trends, but be wary when comparing figures&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./wp-software-employment.webp&quot; alt=&quot;Washington Post: Computer Programmers vs Software Developers x500&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This is a good illustration of the &lt;strong&gt;definition problem&lt;/strong&gt;: in 2003, the U.S. Bureau of Labor Statistics (BLS) &lt;strong&gt;started tracking programmers and developers as different jobs&lt;/strong&gt;. This leads to vastly different curves, with &lt;a href=&quot;https://www.reddit.com/r/AskComputerScience/comments/15et9s4/understanding_the_difference/&quot;&gt;no&lt;/a&gt; &lt;a href=&quot;https://www.bls.gov/ooh/computer-and-information-technology/computer-programmers.htm&quot;&gt;clear&lt;/a&gt; &lt;a href=&quot;https://www.reddit.com/r/programming/comments/1jf8blb/employment_for_computer_programmers_in_the_us_has/&quot;&gt;distinction&lt;/a&gt; &lt;a href=&quot;https://www.reddit.com/r/programming/comments/1jf8blb/comment/miouxhy/&quot;&gt;in&lt;/a&gt; &lt;a href=&quot;https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm&quot;&gt;categorization&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The point of that graph is not that a certain kind of developer is on their way out, but that &lt;strong&gt;data needs to be interpreted with context&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.washingtonpost.com/business/2025/03/14/programming-jobs-lost-artificial-intelligence/&quot;&gt;The Washington Post&lt;/a&gt; also &lt;a href=&quot;https://www.edwardconard.com/macro-roundup/in-2003-the-bls-added-a-new-category-of-software-developer-with-responsibilities-for-design-planning-and-requirements-gathering-while-computer-programmer-employment-is-at-its-low/?view=detail&quot;&gt;provided graphs&lt;/a&gt; with a &lt;strong&gt;breakdown of software workers&lt;/strong&gt;, which paints a clearer picture:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./wp-software-breakdown.png&quot; alt=&quot;Washington Post: Software worker employment breakdown https://www.edwardconard.com/macro-roundup/in-2003-the-bls-added-a-new-category-of-software-developer-with-responsibilities-for-design-planning-and-requirements-gathering-while-computer-programmer-employment-is-at-its-low/?view=detail x500&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Note that it&apos;s a different timescale: 2011-2025. Most of those categories have been stable throughout, with &lt;strong&gt;little impact from the release of LLMs or even inflation&lt;/strong&gt;. The BLS even projects a &lt;strong&gt;&lt;a href=&quot;https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm&quot;&gt;&quot;Much faster than average employment growth&quot;&lt;/a&gt;&lt;/strong&gt; for software developers, which is great news.&lt;/p&gt;
&lt;p&gt;There&apos;s other sources indicating the same pattern:&lt;/p&gt;
&lt;p&gt;:::quote
There are 485k &lt;em&gt;businesses&lt;/em&gt; in the IT Consulting industry in the United States, which has grown at a CAGR [Compound Annual Growth Rate] of 1.7% between 2020 and 2025.; IBIS, 2025&lt;/p&gt;
&lt;p&gt;IT Consulting in the US - Market Research Report; IBIS, 2025
https://www.ibisworld.com/united-states/industry/it-consulting/1415/
:::&lt;/p&gt;
&lt;p&gt;:::quote
Europe Job Growth CAGR [Compound Annual Growth Rate]: 6.4% [employees]&lt;/p&gt;
&lt;p&gt;Software Development in Europe - Market Size, Industry Analysis, Trends and Forecasts; IBIS, 2025
https://www.ibisworld.com/europe/industry/software-development/200645/
:::&lt;/p&gt;
&lt;p&gt;:::quote
[...] ICT specialists in employment in the EU generally &lt;strong&gt;held out against the effects of the global financial and economic crisis&lt;/strong&gt; [...]
[...] &lt;strong&gt;increased&lt;/strong&gt; by 62.2% during the period from 2014 to 2024, [...]
[...] 4.3% between 2022 and 2023 and 4.8% between 2023 and 2024&lt;/p&gt;
&lt;p&gt;ICT specialists in employment; Eurostat, 2025
https://ec.europa.eu/eurostat/statistics-explained/index.php?title=ICT_specialists_in_employment
:::&lt;/p&gt;
&lt;p&gt;It&apos;s completely &lt;strong&gt;fair to be skeptic&lt;/strong&gt; of picking 2020 as the start date for reference of growth, because other events (COVID) had a stronger impact on the market than the announcement of GPT-3. The next sections should address that.&lt;/p&gt;
&lt;p&gt;Going by high-confidence BLS data, the U.S. had 1,656,880 employed Software Developers in &lt;a href=&quot;https://www.bls.gov/oes/2023/may/oes151252.htm&quot;&gt;May 2023&lt;/a&gt;, against 1,654,440 in &amp;lt;a href=&quot;https://data.bls.gov/oesprofile/&quot; title=&quot;Computer and Mathematical Occupations &amp;gt; Software Developers&quot;&amp;gt;May 2024&amp;lt;/a&amp;gt;. That&apos;s a &lt;strong&gt;0.1% 1-year decline&lt;/strong&gt;, within the 0.7% margin of error. Stable in absolute terms, but unusual compared to the typical growth of around 1-5%. There is a reason for that, and it will be evident soon.&lt;/p&gt;
&lt;p&gt;:::tip[analysis]
Software Developer employment growth has slowed down in the last couple years, but there&apos;s been no significant decline.
:::&lt;/p&gt;
&lt;h2&gt;Why securing a job feels tougher&lt;/h2&gt;
&lt;p&gt;Despite employment being stable, there&apos;s much anecdotal evidence that &lt;strong&gt;finding a software job feels tough&lt;/strong&gt;. Why is that?&lt;/p&gt;
&lt;p&gt;This is a measurable effect, not just anecdotal:&lt;/p&gt;
&lt;p&gt;:::quote
78% of tech leaders struggle to find candidates, just as 74% of developers struggle to land jobs.&lt;/p&gt;
&lt;p&gt;HackerRank Developer Skills Report 2025, Insight 6
https://www.hackerrank.com/reports/developer-skills-report-2025
:::&lt;/p&gt;
&lt;p&gt;This source appears biased: HackerRank is where many developers practice for interviews, so it might be obvious that people on the platform are having trouble finding jobs.&lt;/p&gt;
&lt;p&gt;Yet those numbers are &lt;strong&gt;in line with other available data&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;:::quote
74% of employers say they are struggling to find the skilled talent they need. [...]&lt;br /&gt;
76% [in] Information Technology&lt;/p&gt;
&lt;p&gt;Global Talent Shortage; ManpowerGroup, October 2024
https://go.manpowergroup.com/talent-shortage
:::&lt;/p&gt;
&lt;p&gt;:::quote
as of September 2024, the median unemployment duration was about 10.7 weeks (2.5 months) [...] closer to 6 months in tech-heavy sectors&lt;/p&gt;
&lt;p&gt;Average Job Search Time for Tech Roles in the U.S. (2024–2025); Anotnio Montano, April 2025
https://www.linkedin.com/pulse/average-job-search-time-tech-roles-us-20242025-antonio-montano-qehve/
:::&lt;/p&gt;
&lt;p&gt;The U.S. &quot;&lt;a href=&quot;https://www.bls.gov/oes/2023/may/oes_stru.htm#15-0000&quot;&gt;computer and mathematical occupations&lt;/a&gt;&quot; &lt;strong&gt;unemployment rate[^3] &lt;a href=&quot;https://www.bls.gov/cps/cpsaat25.htm&quot;&gt;was 2.8% in 2024&lt;/a&gt;&lt;/strong&gt;, impressively lower than the 4.1% national unemployment rate: &lt;strong&gt;the jobs are there&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It may be partially explained with employment statistics for new developers, as we&apos;ll see later, but a more comprehensive answer involves supply and demand:&lt;/p&gt;
&lt;p&gt;:::quote
65% of the number of [U.S. software] vacancies in January 2020 (a 35% decrease!)&lt;/p&gt;
&lt;p&gt;Software engineering job openings hit five-year low?; The Pragmatic Engineer, 2025
https://blog.pragmaticengineer.com/software-engineer-jobs-five-year-low/
:::&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;missing piece is demand&lt;/strong&gt; in the job market. Even though &lt;strong&gt;software jobs haven&apos;t gone down, job postings have&lt;/strong&gt;. The supply of aspiring developers &lt;a href=&quot;https://careerkarma.com/blog/state-of-the-bootcamp-market-report-2024-statistics-and-share-analysis/&quot;&gt;has kept growing&lt;/a&gt;, outpacing the demand. When there&apos;s more supply (developers) than demand (job postings), employers get to be more picky about who they choose.&lt;/p&gt;
&lt;p&gt;We developers have been &lt;strong&gt;used to a candidate&apos;s market&lt;/strong&gt; (very high demand) for &lt;strong&gt;over a decade&lt;/strong&gt;. We&apos;re now encountering a period of higher resistance (lower demand) for the first time in a long while, &lt;strong&gt;it makes sense that it would seem tough&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But that&apos;s not the full story. As hinted by the HackerRank report, employers are also struggling to hire developers, meaning &lt;strong&gt;there are enough vacancies&lt;/strong&gt;, and the problem lies elsewhere:&lt;/p&gt;
&lt;p&gt;:::quote
In 2023, 57.5% of EU enterprises that recruited or tried to recruit ICT specialists had difficulties in filling ICT vacancies. [...] &lt;br /&gt;
With 43.24% the lack of applications was the difficulty for filling ICT specialists’ positions most often faced by enterprises in 2023&lt;/p&gt;
&lt;p&gt;ICT specialists - statistics on hard-to-fill vacancies in enterprises, 2025
https://ec.europa.eu/eurostat/statistics-explained/index.php?title=ICT_specialists_-_statistics_on_hard-to-fill_vacancies_in_enterprises
:::&lt;/p&gt;
&lt;p&gt;Lack of applications is, &lt;a href=&quot;https://medium.com/career-programming/its-a-fact-remote-software-engineer-jobs-receive-1-000-applicants-each-82fb06507bbf&quot;&gt;surprisingly&lt;/a&gt;, a high share of the problem. Broken hiring practices are also anecdotally a big share of the problem, you hear stories like these &lt;a href=&quot;https://www.linkedin.com/posts/gunnr_finding-a-dev-job-in-2023-fcking-sucks-activity-7095420599979708416-QagO/&quot;&gt;very&lt;/a&gt;[^4] &lt;a href=&quot;https://www.quora.com/All-my-job-applications-for-the-past-four-months-have-been-rejected-without-even-an-opportunity-of-an-interview-stage-Is-this-a-sign-that-I-am-a-bad-software-developer&quot;&gt;often&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;:::quote
A perfect ATS score doesn’t guarantee a human will ever look at [your job application]. [...]
The position is already filled internally. [...]
[Cover letters] work only when a human ... reads your application. [...]
It’s a numbers game with patience, persistence, and a bit of luck. [...]
Many [recruiter] calls are ... to show clients they have a “pool,” [...]
friends or connections may find it difficult to push referrals.&lt;/p&gt;
&lt;p&gt;The Untold Reality of Job Searching in 2025: A Personal Story; Pushpender Bhandari, 2025
https://medium.com/%40pushpender311/the-untold-reality-of-job-searching-in-2025-a-personal-story-18f54ee30304
:::&lt;/p&gt;
&lt;p&gt;:::quote
up to 21% of job ads may be ghost jobs&lt;/p&gt;
&lt;p&gt;Why is it so hard to find a job now? Enter Ghost Jobs; Hunter Ng, Oct 2024
https://arxiv.org/abs/2410.21771
:::&lt;/p&gt;
&lt;p&gt;:::tip[analysis]
Demand for developers has declined, and new developers keep coming.
This leads to a tougher environment, but still plenty of vacancies.
:::&lt;/p&gt;
&lt;h2&gt;Is AI behind the dip?&lt;/h2&gt;
&lt;p&gt;Reputable analyses are almost unanimous on this one:&lt;/p&gt;
&lt;p&gt;:::quote
Interest rate changes explain most of the drop. [...] &lt;br /&gt;
[Interest rate changes affect] many things across the economy since 2022, including hiring, the steep fall in VC funding, and how many tech startups survive, thrive, or die.&lt;/p&gt;
&lt;p&gt;Software engineering job openings hit five-year low?; The Pragmatic Engineer, 2025
https://blog.pragmaticengineer.com/software-engineer-jobs-five-year-low/
:::&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./pe-software-vs-all-postings.png&quot; alt=&quot;Pragmatic Engineer: the curve is about COVID interest rates, not AI
https://blog.pragmaticengineer.com/software-engineer-jobs-five-year-low/
x500&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The same article also explains &lt;strong&gt;why and how COVID and COVID-related interest rate policy changes&lt;/strong&gt; have been so &lt;strong&gt;impactful&lt;/strong&gt; on it: both in a booming growth until 2023, and the fall after.&lt;/p&gt;
&lt;p&gt;You can see a similar conclusion with different data/metrics, by a different team:&lt;/p&gt;
&lt;p&gt;:::quote
Before the pandemic, software developer salaries grew faster than average. That changed when the Covid-19 recession ended.&lt;/p&gt;
&lt;p&gt;The rise—and fall—of the software developer; ADP Research, 2024
https://www.adpresearch.com/the-rise-and-fall-of-the-software-developer/
:::&lt;/p&gt;
&lt;p&gt;Unlike the previous sources, the ADP article suggests a continuous employment loss since 2020 based on independent data, but also &lt;strong&gt;declares AI a non-factor&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;:::tip[analysis]
The dip is explained by COVID and COVID-related interest rate policy changes, AI is a non-factor.
:::&lt;/p&gt;
&lt;p&gt;You can find plenty of articles predicting mass replacement in the future, many implying it&apos;s already happening which is verifiably false. They rely on anecdotes and sensational speculative claims, without supporting research.&lt;/p&gt;
&lt;p&gt;They often cite new developers, whose opinions -which they are entitled to- are generally uninformed and exaggerated; and &lt;strong&gt;CEOs&lt;/strong&gt;, who &lt;strong&gt;have it in their best interest to make&lt;/strong&gt; a bad and boring trend (&lt;strong&gt;inability to maintain personnel&lt;/strong&gt; due to unfavourable economy, and/or bad/impulsive management) &lt;strong&gt;look like&lt;/strong&gt; a good and exciting event (&lt;strong&gt;cost-cutting via AI&lt;/strong&gt; will bring stocks up).&lt;/p&gt;
&lt;p&gt;A good rule of thumb is that when you read them, if you don&apos;t have the time or attention span to check every source, at least check that there are external and somewhat reputable sources.&lt;/p&gt;
&lt;p&gt;We have pretty good explanations for what happened until now, but predicting the future is more complex and will be tackled in separate articles.&lt;/p&gt;
&lt;p&gt;As an early reassurance:&lt;/p&gt;
&lt;p&gt;:::quote
when developers use AI tools, they take 19% longer than without—AI makes them slower. [...]&lt;br /&gt;
even after experiencing the slowdown, they still believed AI had sped them up by 20%.&lt;/p&gt;
&lt;p&gt;Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity; METR, 2025
https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/
:::&lt;/p&gt;
&lt;p&gt;This is one study of several, but there&apos;s varying results. We&apos;ll discuss that more in the relevant article.&lt;/p&gt;
&lt;p&gt;Because future articles will be mostly focused on AI, and I&apos;ve already stated AI is not the problem with demand right now, here&apos;s a short aside on &lt;strong&gt;what non-AI causes mean for the future&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;:::quote
The Beveridge curve illustrates the relationship between job openings ... and unemployment rate [...]
the overall [U.S.] job match relationship returned to its prepandemic position.&lt;/p&gt;
&lt;p&gt;How Have U.S. Workers Fared in a Labor Market Reshaped by the Pandemic?; Federal Reserve Bank of St. Louis, 2025
https://www.stlouisfed.org/on-the-economy/2025/aug/how-us-workers-fared-labor-market-reshaped-pandemic
:::&lt;/p&gt;
&lt;p&gt;The article above is not specifically about software development, but illustrates what is &lt;strong&gt;generally happening to jobs post-pandemic&lt;/strong&gt;, and software development so far is following similar trends. In short, &lt;strong&gt;things are returning to normal&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;As for tech specifically, here are my reasons for why &lt;strong&gt;I speculate a favourable balance will re-emerge&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The field is maturing: long-term-expensive but short-term-cheap broken hiring practices will be fixed&lt;/li&gt;
&lt;li&gt;Demand is already showing signs of rebounding and will keep growing: tech as a whole is not slowing down&lt;/li&gt;
&lt;li&gt;Supply will lag behind by a few years, but adapt: e.g. those scared of AI will drop out, leaving more jobs for everyone else.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Are dev jobs distinctly affected by AI?&lt;/h2&gt;
&lt;p&gt;Another way to see whether AI has been replacing software jobs, is by &lt;strong&gt;comparing employment trends with careers&lt;/strong&gt; that are expected to be &lt;strong&gt;less affected by AI&lt;/strong&gt;. So let&apos;s have a look.&lt;/p&gt;
&lt;p&gt;&amp;lt;dfn&amp;gt;&lt;strong&gt;AI exposure&lt;/strong&gt;&amp;lt;/dfn&amp;gt; is defined as &lt;strong&gt;overlap with human capabilities, regardless of effectiveness&lt;/strong&gt;. Software Development has very high AI exposure, although that doesn&apos;t mean it is or will be automated. &lt;br /&gt;
&lt;a href=&quot;https://sms.onlinelibrary.wiley.com/doi/full/10.1002/smj.3286&quot;&gt;Read more about AIOE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;:::quote
Although the &lt;strong&gt;unemployment rate&lt;/strong&gt; for the most AI-exposed workers is indeed rising, it is actually &lt;strong&gt;rising even faster&lt;/strong&gt; for the &lt;strong&gt;least exposed&lt;/strong&gt; workers. [...]
It doesn’t look like workers more exposed to AI are changing occupations more than they used to.&lt;/p&gt;
&lt;p&gt;AI and Jobs: The Final Word (Until the Next One); Economic Innovation Group, 2025
https://eig.org/ai-and-jobs-the-final-word/
:::&lt;/p&gt;
&lt;p&gt;:::tip[analysis]
Unemployment is &lt;a href=&quot;https://en.wikipedia.org/wiki/Correlation&quot;&gt;inversely correlated&lt;/a&gt; with AI exposure. &lt;br /&gt;
Unintuitively: &lt;strong&gt;higher AI exposure is linked with higher employment&lt;/strong&gt;.&lt;br /&gt;
You&apos;re less likely to find jobs if you switch to less AI-exposed careers.
:::&lt;/p&gt;
&lt;p&gt;If you&apos;re having trouble making sense of it, keep in mind that correlation is not causation. A likely explanation is that &lt;strong&gt;there&apos;s forces at play that have much stronger impact than AI&lt;/strong&gt;, and the cards are laid out such that AI-exposed careers are less negatively impacted by those forces.&lt;/p&gt;
&lt;p&gt;If you wanted to look for possible AI &lt;strong&gt;causation&lt;/strong&gt; instead, &lt;strong&gt;consider what software development is&lt;/strong&gt;, at its core:&lt;/p&gt;
&lt;p&gt;Why do we want programs developed? To make a computer perform a task that would otherwise be assigned to a slower, less consistent, and more expensive[^5] human.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;We are automation&lt;/strong&gt;: employers hire a developer to make a webpage that can be served to millions of people per day, instead of hiring a printing company and tens of thousands of delivery workers.&lt;/p&gt;
&lt;p&gt;:::tip[analysis]
Even if delivery workers are less AI-exposed than developers, more powerful developers could end up removing more delivery jobs than developer jobs.
:::&lt;/p&gt;
&lt;p&gt;We are near the top of the food pyramid of jobs. I don&apos;t like that the pyramid exists, but it is in our favour[^6].&lt;/p&gt;
&lt;p&gt;{/* TODO link to software development comparison article */}&lt;/p&gt;
&lt;h2&gt;Bonus: how helpful is a degree?&lt;/h2&gt;
&lt;p&gt;There&apos;s many arguments in favour and against heading into software via university. This section is only concerned with finding jobs in this dip of lower demand, &lt;strong&gt;regardless of&lt;/strong&gt; whether AI is behind it, or other &lt;strong&gt;factors like salary&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The charts and data below are for all US industries, but computer science is cited as a major factor in all of them.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./oe-graduate-unemployment.png&quot; alt=&quot;US graduate unemployment by education
https://www.oxfordeconomics.com/wp-content/uploads/2025/05/US-Educated-but-unemployed-a-rising-reality-for-college-grads.pdf
x500&quot; /&gt;&lt;/p&gt;
&lt;p&gt;:::quote
While the unemployment rate for those aged 22-27 with less educational attainment has drifted higher, [...] &lt;strong&gt;the unemployment rate for recent college graduates has risen [more]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Educated but unemployed, a rising reality for college grads; Oxford Economics, 2025
https://www.oxfordeconomics.com/wp-content/uploads/2025/05/US-Educated-but-unemployed-a-rising-reality-for-college-grads.pdf
:::&lt;/p&gt;
&lt;p&gt;The wording is not obvious nor conclusive for computer science specifically, but the chart shows how much better off you would be with a degree.&lt;/p&gt;
&lt;p&gt;:::tip[analysis]
A college degree&apos;s impact on your ability to find a software job is small, and getting smaller
:::&lt;/p&gt;
&lt;p&gt;The report points out that it&apos;s &lt;strong&gt;a particularly tough time for new entrants in any field&lt;/strong&gt;. If you&apos;re one of them, you might want to give it a read.&lt;/p&gt;
&lt;p&gt;In line with the AI-exposure section above, there&apos;s some relevant data for graduates:&lt;/p&gt;
&lt;p&gt;:::quote
recent college graduates majoring in accounting and education see unemployment rates below 2%&lt;/p&gt;
&lt;p&gt;The Labor Market for Recent College Graduates – Part 1: No More Jobs?; Encoura, 2025
https://www.encoura.org/resources/wake-up-call/the-labor-market-for-recent-college-graduates-part-1-no-more-jobs/
:::&lt;/p&gt;
&lt;p&gt;2% graduate unemployment is very low, so &lt;strong&gt;accounting&lt;/strong&gt; (a field with high AI exposure) could be a good place to go &lt;strong&gt;if you were seeking alternatives&lt;/strong&gt;. Just keep in mind it&apos;s in the &lt;a href=&quot;https://www.careerexplorer.com/careers/accountant/satisfaction/&quot;&gt;bottom 6% of careers by satisfaction&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;AI hasn&apos;t had noticeable impact on software developer jobs.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So far AI is a non-issue, but how about the future? &lt;strong&gt;Next up&lt;/strong&gt;, we&apos;ll look at whether AI has been boosting software developer productivity, and give projections for the future.&lt;/p&gt;
&lt;p&gt;On top of my &lt;a href=&quot;https://www.toptal.com/resume/matei-copot/N4w275/worlds-top-talent&quot;&gt;over 10 years of experience&lt;/a&gt; in the field, &lt;strong&gt;this post took approximately 50 hours to research and write&lt;/strong&gt;. If it captured your interest, check out &lt;a href=&quot;https://yourweekly.dev&quot;&gt;yourweekly.dev&lt;/a&gt;: a service for aspiring and professional developers.&lt;/p&gt;
&lt;p&gt;import DividerText from &apos;~/components/DividerText.astro&apos;&lt;/p&gt;
&lt;p&gt;&amp;lt;DividerText text=&quot;footnotes&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;[^1]: I will allude to other  less reputable articles, but won&apos;t link to them. They&apos;re easy enough to find on google, without the extra SEO.
[^2]: Most of the references will be for US/EU, because that&apos;s what we find most data/analyses for. These are reasonable indicators for global trends, at least for the countries where this article is legal to read.
[^3]: Some question the effectiveness of unemployment statistics, because it&apos;s &quot;based on unemployment benefit collection&quot;. That&apos;s not the case for BLS data: https://www.bls.gov/cps/cps_htgm.htm#where. Another metric to consider is the participation rate, showing that the number of US job-willing-and-able people is only roughly 1% below pre-covid numbers: https://fred.stlouisfed.org/graph/?g=1hY50
[^4]: Note that this is from 2023, meaning that when demand was at its peak, higher than before covid, finding a job was still unnecessarily tough.
[^5]: financially speaking. The price of human labour is not only salary, but also benefits, taxes, hiring, training, and HR/managers. There&apos;s metrics in which it&apos;s the other way around, such as energy consumption, but that&apos;s not the primary concern of businesses.
[^6]: until there&apos;s nobody left to buy what we&apos;re developing, of course. There must be a balance. This occupational pyramid is only in our favour in relative terms: if we get to the point where corporations don&apos;t respect the balance and economies collapse, we will feel it. But so will everybody else.&lt;/p&gt;
</content:encoded><author>Matei Copot</author></item><item><title>Happiest Careers</title><link>https://yourweekly.dev/happiest-careers</link><guid isPermaLink="true">https://yourweekly.dev/happiest-careers</guid><description>a data-driven comparison</description><pubDate>Fri, 24 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;:::quote
You’ll spend about 80,000 hours working in your career: 40 hours a week, 50 weeks a year, for 40 years. So how to spend that time is one of the most important decisions you’ll ever make.&lt;/p&gt;
&lt;p&gt;80000hours.org Career Guide; Benjamin Todd, April 2016
https://80000hours.org/career-guide/introduction/
:::&lt;/p&gt;
&lt;p&gt;You&apos;ve probably heard that before. At a certain scale, numbers are hard to internalize, so let&apos;s compare it with another figure:&lt;/p&gt;
&lt;p&gt;:::quote
Students across the OECD receive an average of 7 634 hours of compulsory instruction during their primary and lower secondary education&lt;/p&gt;
&lt;p&gt;Education at a Glance; OECD, September 2023
https://www.oecd.org/en/publications/education-at-a-glance-2023_e13bef63-en/full-report/how-much-time-do-students-spend-in-the-classroom_258760fe.html
:::&lt;/p&gt;
&lt;p&gt;The time you spend on your career is roughly 10 times what you spent in compulsory[^compulsory-education] education. Imagine that experience, day by day, 10 times over.&lt;/p&gt;
&lt;p&gt;The good news is that, unlike most compulsory education, you can choose different paths for how you&apos;re going to spend that time.&lt;/p&gt;
&lt;h2&gt;The choice&lt;/h2&gt;
&lt;p&gt;Assuming you don&apos;t want to spend those 10 school-lives being unhappy, whether fresh out of school or switching careers, you might want to weigh your options.&lt;/p&gt;
&lt;p&gt;We can do this by &lt;strong&gt;looking at the options&lt;/strong&gt; and deciding &lt;strong&gt;which one provides&lt;/strong&gt; the &lt;strong&gt;most &quot;value&quot;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For &quot;value&quot;, the ideal metric could be &lt;a href=&quot;https://www.ncbi.nlm.nih.gov/books/NBK179225/&quot;&gt;&quot;&lt;strong&gt;Subjective Well-Being&lt;/strong&gt;&quot; (SWB)&lt;/a&gt;, a scientific construct which roughly means &quot;&lt;strong&gt;an inner sense of happiness and fulfillment&lt;/strong&gt;&quot;. This is &lt;a href=&quot;https://pubmed.ncbi.nlm.nih.gov/24432436/&quot;&gt;the standard for scientific research&lt;/a&gt; on what you might simply call &quot;happiness&quot;, or &quot;a good life&quot;.&lt;/p&gt;
&lt;p&gt;As a software engineer, I&apos;ll be focusing on software engineering, but we need some interesting alternatives to compare. It turns out &lt;a href=&quot;https://www.remitly.com/gb/en/landing/dream-jobs-around-the-world&quot;&gt;most people want to be&lt;/a&gt; pilots, lawyers/policemen, nurses/doctors, and entertainers, so that&apos;s what we&apos;ll compare with.&lt;/p&gt;
&lt;p&gt;:::caution
I&apos;m a software engineer, not a psychologist. I invite corrections by reaching out via matei@yourweekly.dev
:::&lt;/p&gt;
&lt;p&gt;There are several aspects of a career that influence SWB, there are those:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.mdpi.com/2075-4698/10/3/62&quot;&gt;you &lt;strong&gt;say&lt;/strong&gt;&lt;/a&gt; have &quot;value&quot; (job security, own schedule, salary),&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.federalreserve.gov/econres/feds/files/2024004pap.pdf&quot;&gt;you &lt;strong&gt;act on&lt;/strong&gt;&lt;/a&gt; as &quot;valuable&quot; (interest, work-life balance, salary), and&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.gatech.edu/tfl/wp-content/plugins/zotpress/lib/request/request.dl.php?api_user_id=6633671&amp;amp;content_type=application%2Fpdf&amp;amp;dlkey=C5GMYC36&quot;&gt;give &lt;strong&gt;measurable&lt;/strong&gt;&lt;/a&gt; &quot;value&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Instinctively, the first two seem like the most important ones, but &lt;strong&gt;the only one that&lt;/strong&gt; really &lt;strong&gt;matters&lt;/strong&gt; is the &lt;strong&gt;measurable outcome&lt;/strong&gt;[^measurable-outcome].&lt;/p&gt;
&lt;p&gt;So &lt;strong&gt;which aspects of a career&lt;/strong&gt; do &lt;strong&gt;influence our Subjective Well-Being&lt;/strong&gt;?&lt;/p&gt;
&lt;h2&gt;Satisfaction&lt;/h2&gt;
&lt;p&gt;There&apos;s plenty of evidence that job satisfaction has significant impact on SWB: it makes sense that to feel good, it would help if you were satisfied with the work.&lt;/p&gt;
&lt;p&gt;However, it&apos;s hard to find granular enough data on job satisfaction by occupation/career.&lt;/p&gt;
&lt;p&gt;Yet occupational group is one of the most important explaining variables of Work Engagement, a &lt;a href=&quot;https://www.wilmarschaufeli.nl/publications/Schaufeli/597.pdf&quot;&gt;significant factor of Job Satisfaction&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;:::quote
Work engagement is defined as &quot;a positive, fulfilling state of mind that is characterized by vigor, dedication, and absorption&quot;
[...]
Occupational group and industry were relatively the most important factors associated with work
engagement, explaining 68.1% and 17.1% of all the explained variance of the model, respectively.&lt;/p&gt;
&lt;p&gt;Who is Engaged at Work? A Large-Scale Study in 30 European Countries; 2019
https://www.wilmarschaufeli.nl/publications/Schaufeli/513.pdf
:::&lt;/p&gt;
&lt;p&gt;Your occupation/industry explains around 85% of how fulfilled you will feel with the work.&lt;/p&gt;
&lt;p&gt;According to that study, &quot;Professionals&quot; is the second best groups to be in, which includes Software Developers, but also &lt;a href=&quot;https://ilostat.ilo.org/methods/concepts-and-definitions/classification-occupation/&quot;&gt;doctors, lawyers, and researchers&lt;/a&gt;[^work-engagement-pilots], so it doesn&apos;t narrow it down among other top careers. The group &quot;Managers&quot; takes the top spot.&lt;/p&gt;
&lt;p&gt;So the best we can do is non-academic data, which is more likely to be biased, have inconsistent definitions, or have problematic methodology. But we work with what we have!&lt;/p&gt;
&lt;h3&gt;unstandardized data&lt;/h3&gt;
&lt;p&gt;Here are some sources in no particular order:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./ci-top-10-happiest.png&quot; alt=&quot;top 10 careers by happiness, according to career.io https://career.io/career-advice/careers-that-make-americans-happiest {x500}&quot; /&gt;&lt;/p&gt;
&lt;p&gt;:::quote
Jobs with the highest job satisfaction in 2024:
&amp;lt;ol&amp;gt;
&amp;lt;li style=&quot;list-style-type: none&quot;&amp;gt;[...]&amp;lt;/li&amp;gt;
&amp;lt;li value=&quot;3&quot;&amp;gt;Software Developer - with an overall rating of 3.86 out of 5&amp;lt;/li&amp;gt;
&amp;lt;li style=&quot;list-style-type: none&quot;&amp;gt;[...]&amp;lt;/li&amp;gt;
&amp;lt;li value=&quot;10&quot;&amp;gt;Physicians - with an overall rating of 3.69 out of 5&amp;lt;/li&amp;gt;
&amp;lt;/ol&amp;gt;&lt;/p&gt;
&lt;p&gt;The careers that make Americans happiest, based on 750k employees; career.io, 2024
https://career.io/career-advice/careers-that-make-americans-happiest
:::&lt;/p&gt;
&lt;p&gt;&amp;lt;details&amp;gt;
&amp;lt;summary&amp;gt;expand analysis&amp;lt;/summary&amp;gt;&lt;/p&gt;
&lt;p&gt;3rd best overall, that sounds nice! Data scientist (which I consider a form of software developer) is 1st by happiness among high-paying.&lt;/p&gt;
&lt;p&gt;Categories come from the top 50 occupations with highest employee count according to BLS, which is great[^specificity-problem]. But they use the average rating on Glassdoor as the metric for happiness, a method which has many problems, but &lt;a href=&quot;https://www.researchgate.net/publication/337567458_Crowdsourcing_Job_Satisfaction_Data_Examining_the_Construct_Validity_of_Glassdoorcom_Ratings&quot;&gt;there is positive correlation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Doctors are 10th in that list, as &quot;Physicians&quot;. Pilots, lawyers are nowhere to be found, but this is more likely to be because they don&apos;t make the cut of top 50 occupations by employee count, than a significant result.
&amp;lt;/details&amp;gt;&lt;/p&gt;
&lt;p&gt;:::quote
[Job satisfaction]
Physicians: 80%
Commercial Pilots: 77%
Lawyers: 68%
Computer Software Engineers, Applications: 57%&lt;/p&gt;
&lt;p&gt;The Most and Least Meaningful Jobs; Payscale
https://www.payscale.com/data-packages/most-and-least-meaningful-jobs/full-list
:::&lt;/p&gt;
&lt;p&gt;&amp;lt;details&amp;gt;
&amp;lt;summary&amp;gt;expand analysis&amp;lt;/summary&amp;gt;&lt;/p&gt;
&lt;p&gt;A satisfaction of 57% is in the bottom 22% of occupations in their list, with median satisfaction of 68%. Not very good.&lt;/p&gt;
&lt;p&gt;Unlike the previous article, very specific occupations like &quot;boilermakers&quot; and &quot;slot key persons&quot; bloat the list, pushing software development down. They also don&apos;t give any indication on how they got these numbers: for all we know, all of these have a sample size of 1.&lt;/p&gt;
&lt;p&gt;In this list, lawyers have 68% satisfaction, pilots 74-77%, and physicians 80%. All significantly above computer programmers, which are all lumped into one category
&amp;lt;/details&amp;gt;&lt;/p&gt;
&lt;p&gt;:::quote
[self-rated happiness:]
[&lt;a href=&quot;https://www.careerexplorer.com/careers/pilot/satisfaction/&quot;&gt;pilots&lt;/a&gt;: 3.6/5 (top 15%)]
[&lt;a href=&quot;https://www.careerexplorer.com/careers/doctor/satisfaction/&quot;&gt;doctors&lt;/a&gt;: 3.4/5 (top 34%)]
software engineers: 3.2/5 (bottom 46%)
[&lt;a href=&quot;https://www.careerexplorer.com/careers/lawyers/satisfaction/&quot;&gt;lawyers&lt;/a&gt;: 3.0/5 (bottom 7%)]&lt;/p&gt;
&lt;p&gt;Are software engineers happy?; CareerExplorer.com
https://www.careerexplorer.com/careers/software-engineer/satisfaction/
:::&lt;/p&gt;
&lt;p&gt;&amp;lt;details&amp;gt;
&amp;lt;summary&amp;gt;expand analysis&amp;lt;/summary&amp;gt;
That&apos;s somewhere in between bottom 22%, and 3rd best from previous articles. Sounds alright, but not very positive.&lt;/p&gt;
&lt;p&gt;As for other careers, the order is very different than those in previous articles, and by a wide margin&lt;/p&gt;
&lt;p&gt;The story changes if we &lt;a href=&quot;https://www.careerexplorer.com/careers/?ease_of_employment=easy&amp;amp;ordering=-satisfaction&quot;&gt;filter by &quot;attainable careers&quot;&lt;/a&gt;, where JavaScript developer is 4th best out of 121, and Web Developer is 13th overall. But we can&apos;t cherry-pick like that: pilots, lawyers, and doctors are not in these 121 &quot;attainable&quot; jobs, and neither is software developer as a whole. You do find some healthcare workers.
&amp;lt;/details&amp;gt;&lt;/p&gt;
&lt;p&gt;:::quote
[...] 17 popular jobs with the highest job satisfaction rates[:]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Physician&lt;/li&gt;
&lt;li&gt;Software engineer&lt;/li&gt;
&lt;li&gt;Software developer
[...]
&amp;lt;li value=&quot;11&quot;&amp;gt;Flight attendant&amp;lt;/li&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;17 of the Happiest Jobs (With Duties and Salary Information); Jamie Birt, Indeed
https://www.indeed.com/career-advice/finding-a-job/happiest-jobs
:::&lt;/p&gt;
&lt;p&gt;&amp;lt;details&amp;gt;
&amp;lt;summary&amp;gt;expand analysis&amp;lt;/summary&amp;gt;
Not only is software the second best by satisfaction, it&apos;s also the third best!&lt;/p&gt;
&lt;p&gt;This again highlights the specificity problem[^specificity-problem], those should not count as separate. They also got their data from Glassdoor, but ended up with a significantly different order compared to the career.io list. They don&apos;t explain it, but the reason seems to be that they sort by salary&lt;/p&gt;
&lt;p&gt;Pilots and lawyers didn&apos;t make the list, but flight attendants are 11th, and doctors are 1st.
&amp;lt;/details&amp;gt;&lt;/p&gt;
&lt;p&gt;It&apos;s inconsistent: &lt;strong&gt;software development&lt;/strong&gt; does &lt;strong&gt;rank very well&lt;/strong&gt;, &lt;strong&gt;often above&lt;/strong&gt; the other careers we mentioned, but &lt;strong&gt;sometimes below&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I mentioned that occupation has a strong effect on job satisfaction, yet we don&apos;t see significant differences among these already high-satisfaction jobs.&lt;/p&gt;
&lt;p&gt;:::tip[summary]
The &lt;strong&gt;average&lt;/strong&gt; satisfaction difference is not between software and the reference careers, but between software alongside the relevant careers, when compared with e.g. freight handlers and parking lot attendants[^elementary-occupations].
:::&lt;/p&gt;
&lt;h3&gt;interest fit&lt;/h3&gt;
&lt;p&gt;That doesn&apos;t mean satisfaction is irrelevant when picking between these careers, only that &lt;strong&gt;average&lt;/strong&gt; satisfaction won&apos;t help in choosing between the ones we&apos;re comparing with.&lt;/p&gt;
&lt;p&gt;We still have some useful metrics:&lt;/p&gt;
&lt;p&gt;:::quote
Results revealed a statistically significant, positive relation between interest fit and overall job satisfaction&lt;/p&gt;
&lt;p&gt;Interest Fit and Job Satisfaction: A Systematic Review and Meta-Analysis
https://www.researchgate.net/publication/344755247_Interest_Fit_and_Job_Satisfaction_A_Systematic_Review_and_Meta-Analysis
:::&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you&apos;re interested&lt;/strong&gt; in the work, your &lt;strong&gt;job satisfaction&lt;/strong&gt; is likely &lt;strong&gt;higher&lt;/strong&gt;. This study claims a correlation of 0.2: not a strong effect, but definitely a noticeable one.&lt;/p&gt;
&lt;p&gt;Intuitively, that makes sense: if you&apos;re interested in &lt;strong&gt;tech, mathematics, or games&lt;/strong&gt;, you&apos;re &lt;strong&gt;more likely&lt;/strong&gt; to be &lt;strong&gt;happy&lt;/strong&gt; if you&apos;re a &lt;strong&gt;software developer&lt;/strong&gt; than someone who isn&apos;t. But if you&apos;re just looking for a job for the money, and aren&apos;t at all interested in these topics, you can still be a satisfied developer.&lt;/p&gt;
&lt;p&gt;:::tip[summary]
There&apos;s no significant difference in average satisfaction between devs, pilots, lawyers, and doctors. &lt;br /&gt;
You should pick the one you&apos;re most interested in.
:::&lt;/p&gt;
&lt;h2&gt;Salary&lt;/h2&gt;
&lt;p&gt;Work is not only about having purpose and feeling good, it&apos;s also about having capital to spend on the other joys and needs of life.&lt;/p&gt;
&lt;p&gt;For &lt;strong&gt;developers&lt;/strong&gt;, this is &lt;strong&gt;not a contested metric&lt;/strong&gt;. But let&apos;s check our assumptions.&lt;/p&gt;
&lt;p&gt;:::caution
I&apos;m a software engineer, not a statistician or economist. I invite corrections via matei@yourweekly.dev
:::&lt;/p&gt;
&lt;p&gt;I took the best data available (&lt;a href=&quot;https://data.bls.gov/oes/#/industry/000000&quot;&gt;BLS OEWS, May 2024&lt;/a&gt;), and compiled a &lt;a href=&quot;https://docs.google.com/spreadsheets/d/18p-4xWpYg2P5C8_lsxg5C-iow-nnforegDNOUe0th04/edit?usp=sharing&quot;&gt;quick and dirty google sheet&lt;/a&gt; to make it easier to explore.&lt;/p&gt;
&lt;p&gt;:::quote
[median wage by occupation in $/hr:]
&amp;lt;ol&amp;gt;
&amp;lt;li value=&quot;1&quot;&amp;gt;Family Medicine Physicians: 114.61 $/hr&amp;lt;/li&amp;gt;
&amp;lt;li value=&quot;19&quot;&amp;gt;Lawyers: 72.67 $/hr&amp;lt;/li&amp;gt;
&amp;lt;li value=&quot;41&quot;&amp;gt;Software Developers: 63.98 $/hr&amp;lt;/li&amp;gt;
&amp;lt;/ol&amp;gt;&lt;/p&gt;
&lt;p&gt;Occupational Employment and Wage Statistics Query System OEWS; U.S. Bureau of Labour Satistics, 2024
https://data.bls.gov/oes/#/industry/000000
:::&lt;/p&gt;
&lt;p&gt;Where are pilots? BLS leaves pilot data blank, because it doesn&apos;t keep track of values above 115 $/hr, so it would be above physicians[^pilot-salary].&lt;/p&gt;
&lt;p&gt;To further bring developers down, the US is known to give &lt;a href=&quot;https://www.reddit.com/r/dataisbeautiful/comments/1carqzw/oc_2024_software_engineer_compensation/&quot;&gt;disproportionately high salaries&lt;/a&gt;, so this is not globally representative.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At first&lt;/strong&gt;, &lt;strong&gt;developer salaries&lt;/strong&gt; seem to be the &lt;strong&gt;worst&lt;/strong&gt; of those 4 occupations, but that&apos;s &lt;strong&gt;not the end of the story&lt;/strong&gt;: those categories are quite narrow, there&apos;s many different kinds of doctors, lawyers, and programmers.&lt;/p&gt;
&lt;p&gt;It makes sense that a neurosurgeon earns more than your average developer: looking at narrow definitions only gives you an idea of a &quot;&lt;strong&gt;maximum&lt;/strong&gt;&quot; for each field, it&apos;s &lt;strong&gt;not&lt;/strong&gt; a &lt;strong&gt;good indicator&lt;/strong&gt; of what going for that career path might look like. So let&apos;s &lt;strong&gt;zoom out&lt;/strong&gt; a little:&lt;/p&gt;
&lt;p&gt;:::quote
[median wage by occupation in $/hr:]
&amp;lt;ol&amp;gt;
&amp;lt;li value=&quot;2&quot;&amp;gt;Computer and Mathematical Occupations: 50.89 $/hr&amp;lt;/li&amp;gt;
&amp;lt;li value=&quot;3&quot;&amp;gt;Legal Occupations: 48.07 $/hr&amp;lt;/li&amp;gt;
&amp;lt;li value=&quot;5&quot;&amp;gt;Healthcare Practitioners and Technical Occupations: 39.95 $/hr&amp;lt;/li&amp;gt;
&amp;lt;li value=&quot;16&quot;&amp;gt;Transportation and Material Moving Occupations: 20.55 $/hr&amp;lt;/li&amp;gt;
&amp;lt;/ol&amp;gt;&lt;/p&gt;
&lt;p&gt;Occupational Employment and Wage Statistics Query System OEWS; U.S. Bureau of Labour Satistics, 2024
https://data.bls.gov/oes/#/industry/000000
:::&lt;/p&gt;
&lt;p&gt;Development related jobs are the &quot;&lt;strong&gt;Computer and Mathematical Occupations&lt;/strong&gt;&quot; category. It might seem broad from the name, but it&apos;s a &lt;a href=&quot;https://www.bls.gov/oes/2023/may/oes_stru.htm#15-0000&quot;&gt;very reasonable grouping&lt;/a&gt;. It&apos;s relatively easy to jump between occupations in this group.&lt;/p&gt;
&lt;p&gt;What we see is that the order has flipped! The category for pilots is at the bottom, then doctors, then lawyers, then &lt;strong&gt;developers at the top&lt;/strong&gt;, just before management professions.&lt;/p&gt;
&lt;p&gt;That&apos;s because, while the category for developers is representative of developers, pilots are in the same category as taxi and bus drivers. To a lesser extent, this same effect is seen in lawyers and doctors.&lt;/p&gt;
&lt;p&gt;If there is such a thing as a &lt;strong&gt;true ranking&lt;/strong&gt;[^true-ranking], it&apos;s &lt;strong&gt;somewhere in between&lt;/strong&gt; the two lists.&lt;/p&gt;
&lt;p&gt;An important take-away is that &lt;strong&gt;by entering software engineering&lt;/strong&gt;, you&apos;re &lt;strong&gt;almost guaranteed a high-paying salary&lt;/strong&gt;, while you can&apos;t say the same for the other fields. A &lt;a href=&quot;https://medschoolinsiders.com/pre-med/why-you-probably-wont-become-a-doctor/#:~:text=Only%20a%20small%20fraction%20of,Let&apos;s%20find%20out.&quot;&gt;small fraction&lt;/a&gt; of people that intend to become e.g. doctors, &lt;a href=&quot;https://ausoma.org/blog/dropout-rate-for-medical-students/#:~:text=The%20variations%20are%20massive%E2%80%94between,combined%20programs%2C%20and%20personal%20issues.&quot;&gt;become doctors&lt;/a&gt;, while it&apos;s hard to fail as a software engineer[^fail-in-career].&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./gs-hourly-wages.png&quot; alt=&quot;avg $/hr per major BLS SOC category, May 2024&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The graph is &lt;strong&gt;sorted by median&lt;/strong&gt; (blue), which is more representative of the average career, and in this category it&apos;s the &lt;strong&gt;second best&lt;/strong&gt; overall, much higher than the national median of 23.80$/hr BLS gives. By average (red), we get a similar result at 56$/hr, well above the &lt;a href=&quot;https://tradingeconomics.com/united-states/wages&quot;&gt;national average of 32$/hr&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&apos;d be doing a lot better than most people in your country, if you live in the US. Whether that&apos;s twice as rich or three times as rich might not end up mattering, it&apos;s a choice only you can make.&lt;/p&gt;
&lt;p&gt;If instead you&apos;re driven by ambition, consider that, normally, &lt;a href=&quot;https://www.levels.fyi/companies/google/salaries/software-engineer&quot;&gt;senior google developers (L5) make ~200 usd per hour&lt;/a&gt;. That&apos;s much higher than the median physician, and an attainable position if you&apos;re dedicated.&lt;/p&gt;
&lt;p&gt;:::tip[summary]
The highest doctor salary is higher than the typical developer salary.
The median developer&apos;s is higher than the median healthcare worker&apos;s.
How you want to compare depends on you.
:::&lt;/p&gt;
&lt;h3&gt;starting salary&lt;/h3&gt;
&lt;p&gt;Even though software development is high-paying, I recommend some level of humility, at least for the next few years &lt;a href=&quot;https://yourweekly.dev/tasc-1-developer-jobs/&quot;&gt;while we recover from the economic effects of COVID&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Your &lt;strong&gt;starting salary&lt;/strong&gt; won&apos;t be the median salary, but remember to &lt;strong&gt;compare&lt;/strong&gt; that with the starting salaries of other occupations. According to BLS data, &lt;a href=&quot;https://data.bls.gov/oes/#/industry/000000&quot;&gt;at least 75% of employed in the category make 36$/hr&lt;/a&gt;, which is more than what ~75% of all U.S. employees make.&lt;/p&gt;
&lt;p&gt;This is again hard to compare with the other careers we mentioned, because e.g. the bottom 25% of earning doctors have already gone through &lt;a href=&quot;https://www.kaptest.com/study/mcat/how-long-does-it-take-to-become-a-doctor/&quot;&gt;11-16 years of training&lt;/a&gt;, while the developer they&apos;re being compared with might have been on the job for 1 year, and not attended university.&lt;/p&gt;
&lt;p&gt;In practice, for the other careers, the comparable starting salary is negative and steep!&lt;/p&gt;
&lt;h3&gt;initial costs&lt;/h3&gt;
&lt;p&gt;:::quote
[...] the average price of an undergraduate degree and medical degree [is] a whopping $364,536&lt;/p&gt;
&lt;p&gt;How Much Does It Cost to Become a Doctor?; TJ Porter on The White Coat Investor, 2023
https://www.whitecoatinvestor.com/average-cost-to-become-a-doctor/
:::&lt;/p&gt;
&lt;p&gt;:::quote
The average total cost of law school is $217,480.&lt;/p&gt;
&lt;p&gt;Average Cost of Law School; Melanie Hanson on educationdata.org, 2025
https://educationdata.org/average-cost-of-law-school
:::&lt;/p&gt;
&lt;p&gt;:::quote
It costs $105,000 to [be licensed as an airline] pilot if you’re starting with zero experience&lt;/p&gt;
&lt;p&gt;How Much Does it Cost to Become a Pilot?; thrustflight.com
https://www.thrustflight.com/cost-to-become-pilot/
:::&lt;/p&gt;
&lt;p&gt;:::quote
A bachelor’s degree in computer science costs $15,000 to $60,000 for on-campus programs&lt;/p&gt;
&lt;p&gt;Is a Computer Science Degree Worth It for 2025? Imed Bouchrika, Phd on research.com
https://research.com/degrees/is-computer-science-degree-worth-it#:~:text=A%20bachelor&apos;s%20degree%20in%20computer%20science
:::&lt;/p&gt;
&lt;p&gt;But the good news are not over for developers: around 20% of professional developers &lt;a href=&quot;https://survey.stackoverflow.co/2025/developers#2-educational-attainment&quot;&gt;don&apos;t have a bachelor&apos;s degree&lt;/a&gt;. &lt;strong&gt;Unlike the other 3 careers, you can get great software developer jobs with little to no financial investment.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;:::tip[summary]
Top doctors, pilots, and lawyers earn more than the top developers. &lt;br /&gt;
But the expected value (likely salary) of going into software is higher
:::&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Is that it? These can&apos;t be the only factors.&lt;/p&gt;
&lt;p&gt;They&apos;re not, but they&apos;re by far the &lt;strong&gt;most significant ones&lt;/strong&gt;, that you have control over. &lt;strong&gt;Job Satisfaction and Salary are the best predictors of Subjective Well-Being&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;You spend most of your life at work, and reaping benefits of work.
Intuitively, it makes sense that Job Satisfaction and Salary are the main factors.&lt;/p&gt;
&lt;p&gt;What about &lt;strong&gt;work-life balance&lt;/strong&gt; and &lt;strong&gt;job security&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;These and other factors are &lt;strong&gt;baked into&lt;/strong&gt; what is measured in &lt;strong&gt;Job Satisfaction&lt;/strong&gt;. Job Security does play a special role: if it&apos;s very hard to get the job, the many that didn&apos;t reach their goals are not fully accounted for.&lt;/p&gt;
&lt;p&gt;Can you guess which career is by far the easiest to get into, of the ones listed? And no, &lt;a href=&quot;/tasc-1-developer-jobs&quot;&gt;AI isn&apos;t taking developer jobs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;:::tip[summary]
Software development is comparable to (if not better than) other highly sought-after careers on most metrics.&lt;/p&gt;
&lt;p&gt;The distinguishing factors that affect choice are &quot;interest&quot; and &quot;initial resources/cost&quot;.
:::&lt;/p&gt;
&lt;p&gt;I hope this article was helpful, whether to help reassure you of a choice you&apos;ve made, or to avoid making choices that will leave you in debt.&lt;/p&gt;
&lt;p&gt;:::note[advertisement]
Despite not being conclusive or as polished as I&apos;d like, this article took over 100 hours to research and write.&lt;/p&gt;
&lt;p&gt;If it captured your interest, you&apos;re probably well suited for a career in software development, and you might be interested in starting your own path with my budget-friendly high-value mentoring service: &lt;a href=&quot;/&quot;&gt;yourweekly.dev&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you&apos;re not sure, you can use the 15 minute free trial and we can chat through your options!
:::&lt;/p&gt;
&lt;p&gt;import DividerText from &apos;~/components/DividerText.astro&apos;&lt;/p&gt;
&lt;p&gt;&amp;lt;DividerText text=&quot;footnotes&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;[^compulsory-education]: I couldn&apos;t find a direct source that includes the rest of secondary education. Linearly extrapolating to 12 years gives you 10,178 hours, so a career is 8x the amount of hours.
[^measurable-outcome]: When buying a used car, you may say you chose it because 1. it&apos;s &quot;a classic&quot;, while really you bought it because 2. it had a nice paint job and the salesman seems to like you, but what will predict whether it&apos;s a good choice is 3. the mileage and service history.
[^work-engagement]: Also a &lt;a href=&quot;https://www.researchgate.net/publication/374164589_Does_Work_Engagement_Effectively_Predict_Subjective_Well-Being_A_Meta-Analysis_Using_R_Statistical_Software/link/6511bcbec05e6d1b1c31416e/download?_tp=eyJjb250ZXh0Ijp7ImZpcnN0UGFnZSI6InB1YmxpY2F0aW9uIiwicGFnZSI6InB1YmxpY2F0aW9uIn19&quot;&gt;significant factor of SWB&lt;/a&gt; by itself
[^work-engagement-pilots]: Pilots are in the third best group: &quot;Technicians and associate professionals&quot;
[^specificity-problem]: It&apos;s great because they didn&apos;t try to make their own categories. But it has problems, because BLS data still has specificity problems, see my explanation &lt;a href=&quot;/tasc-1-developer-jobs#are-software-developer-jobs-declining&quot;&gt;here&lt;/a&gt;.
[^elementary-occupations]: &quot;Elementary occupations&quot; was the group least correlated with job satisfaction. I&apos;m sure many of these are happy people, these are indicators of trends in a group, you can&apos;t make assumptions about individuals!
[^pilot-salary]: Pilots are paid differently and don&apos;t fit well into the metric. The actual hourly wage might be as low as 20% of what BLS indicates: https://ctipft.com/how-pilot-pay-works/ . BLS also doesn&apos;t include figures for some doctors doctrines because they&apos;re too high. &quot;Family Medicine Physician&quot; is not actually the highest-earning according to BLS. I don&apos;t account for this in the spreadsheet, and you&apos;ll see why it doesn&apos;t matter if you keep reading.
[^true-ranking]: Which ranking system is &quot;right&quot; depends on many subjective and individual factors, such as how ambitious you are, your initial resources, and your ability to learn. While dreaming of an ideal life sounds nice, very few people get there, and planning for the case that you don&apos;t fully get there is the sign of a wise person.
[^fail-in-career]: This is a heavy simplification. While the vast majority that set out to be doctors, pilots, and lawyers don&apos;t end up achieveing their goal, software engineering also has a steep initial drop-off, to do with discipline and ability to self-learn. But if you&apos;re at least a little motivated, and find the right people that can guide you through it, that&apos;s much easier to overcome than extreme tuition fees and years of study.&lt;/p&gt;
</content:encoded><author>Matei Copot</author></item><item><title>Painting with functions</title><link>https://yourweekly.dev/painting-with-functions</link><guid isPermaLink="true">https://yourweekly.dev/painting-with-functions</guid><description>learning functions visually, beginner-friendly</description><pubDate>Wed, 31 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;import &apos;./style.css&apos;&lt;/p&gt;
&lt;p&gt;import Editor from &apos;~/components/Editor/index.astro&apos;
import DividerText from &apos;~/components/DividerText.astro&apos;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Functions are everywhere in programming&lt;/strong&gt;. If you&apos;re confused by the concept, it makes sense to take some time to understand them now, and save yourself from a lot of pain.&lt;/p&gt;
&lt;p&gt;In its simplest form, &lt;strong&gt;a function is&lt;/strong&gt; a reusable &lt;strong&gt;sequence of instructions&lt;/strong&gt;. A label for lines of code.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;An instruction is&lt;/strong&gt; the programmer &lt;strong&gt;telling the computer to do something&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you tell your dog to sit, or bark, or shake, that&apos;s an instruction.&lt;/p&gt;
&lt;p&gt;We&apos;ll start with a &lt;strong&gt;computer&lt;/strong&gt; that &lt;strong&gt;already knows how to draw&lt;/strong&gt; simple &lt;strong&gt;shapes&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// This grey text is a &quot;comment&quot;.
// It&apos;s just for you to read, it has
//  no effect on the program.

// This is an instruction! Draw a:
rectangle(100, 200, 150, 250, &apos;red&apos;);
//          x,   y,   w,   h, color

// It says: draw a rectangle:
//  100 pixels from the left (x)
//  200 pixels from the top (y)
//  150 pixels width (w)
//  250 pixels height (h)
//  in red (color)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;By the end of the article, you&apos;ll be able to make relatively complex paintings using these simple shapes, by combining them using functions.&lt;/p&gt;
&lt;p&gt;Let&apos;s get to know what instructions we can work with.&lt;/p&gt;
&lt;h2&gt;Shapes&lt;/h2&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// rectangle(x, y, width, height, color)
rectangle(100, 100, 400, 100, &apos;red&apos;);

// circle(x, y, radius, color)
circle(200, 300, 50, &apos;blue&apos;);
// x and y specify the center.

// triangle(x, y, w, h, color)
triangle(400, 400, 200, 150, &apos;green&apos;);
// x and y specify center of base.
// w is width of base.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;We can &lt;strong&gt;draw rectangles&lt;/strong&gt;, &lt;strong&gt;circles&lt;/strong&gt;, and &lt;strong&gt;triangles&lt;/strong&gt;. What we put in the &lt;strong&gt;parentheses&lt;/strong&gt; is information about &lt;strong&gt;where to draw them, and what color&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In the editor above, change the numbers until you understand what they do. Don&apos;t continue until you can make the circle fit inside the rectangle!&lt;/p&gt;
&lt;h2&gt;Composing&lt;/h2&gt;
&lt;p&gt;What can we do with this? A whole lot!&lt;/p&gt;
&lt;p&gt;Let&apos;s combine 2 instructions, and &lt;strong&gt;draw a tree&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// a trunk
rectangle(280, 300, 40, 100, &apos;chocolate&apos;);

// the leaves
triangle(300, 300, 200, 200, &apos;green&apos;);

// optional:
// - Edit this to make your own tree!
// - E.g. can you add christmas ornaments?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;:::tip
&lt;strong&gt;Click&lt;/strong&gt; on the top left (where x and y are labeled) &lt;strong&gt;to hide/show the grid&lt;/strong&gt;
:::&lt;/p&gt;
&lt;p&gt;Looks lonely! Let&apos;s make it &lt;strong&gt;a little smaller&lt;/strong&gt;, and add &lt;strong&gt;a few more trees&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// left tree
rectangle(290 - 150, 300, 20, 50, &apos;chocolate&apos;);
triangle(300 - 150, 300, 100, 100, &apos;green&apos;);

// center tree
rectangle(290, 300, 20, 50, &apos;chocolate&apos;);
triangle(300, 300, 100, 100, &apos;green&apos;);

// right tree
rectangle(290 + 150, 300, 20, 50, &apos;chocolate&apos;);
triangle(300 + 150, 300, 100, 100, &apos;green&apos;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;See how, &lt;strong&gt;to move&lt;/strong&gt; an exact copy &lt;strong&gt;150 pixels to the right&lt;/strong&gt;, we just &lt;strong&gt;add 150 to&lt;/strong&gt; the &lt;strong&gt;&lt;code&gt;x&lt;/code&gt;&lt;/strong&gt; coordinates (how far to the right it is). We subtract to go left.&lt;/p&gt;
&lt;p&gt;Apart from that x-shifting, &lt;strong&gt;the rest of the code is the same for all the trees&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Writing the same code with some small variations gets tedious over time: say I wanted &lt;strong&gt;10 trees&lt;/strong&gt;, that&apos;s &lt;strong&gt;a lot to write&lt;/strong&gt; or copy paste!&lt;/p&gt;
&lt;h2&gt;Generalizing&lt;/h2&gt;
&lt;p&gt;That&apos;s where &lt;strong&gt;functions&lt;/strong&gt; come in: they &lt;strong&gt;get rid of&lt;/strong&gt; this &lt;strong&gt;repetitiveness&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let&apos;s start with that center tree:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// left tree
rectangle(290 - 150, 300, 20, 50, &apos;chocolate&apos;);
triangle(300 - 150, 300, 100, 100, &apos;green&apos;);

// center tree. Now a function!
tree();

// right tree
rectangle(290 + 150, 300, 20, 50, &apos;chocolate&apos;);
triangle(300 + 150, 300, 100, 100, &apos;green&apos;);

function tree() {
  rectangle(290, 300, 20, 50, &apos;chocolate&apos;);
  triangle(300, 300, 100, 100, &apos;green&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;We turned the center tree into &lt;strong&gt;&lt;code&gt;function tree() { ... }&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;executed&lt;/strong&gt; the lines inside it &lt;strong&gt;with &lt;code&gt;tree()&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We have defined the &lt;code&gt;tree&lt;/code&gt; function as drawing a rectangle and a triangle, in a tree layout, just like we did before.&lt;/p&gt;
&lt;p&gt;You can see the &lt;strong&gt;result is indistinguishable&lt;/strong&gt;! It&apos;s exactly the same picture.&lt;/p&gt;
&lt;p&gt;Let&apos;s try to replace our other trees, to avoid the repetitiveness:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;1&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// left tree (expected)
tree(); // goes in the center instead!

// center tree
tree();

// right tree (expected)
tree(); // goes in the center instead!

function tree() {
  rectangle(290, 300, 20, 50, &apos;chocolate&apos;);
  triangle(300, 300, 100, 100, &apos;green&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;That&apos;s a &lt;strong&gt;problem&lt;/strong&gt;: the program drew 3 trees, but they&apos;re &lt;strong&gt;all on top of each other&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The rectangles and triangles for each tree are drawn at exactly the same positions, there&apos;s nothing to tell each tree that it should be to the left or to the right (&lt;code&gt;-150&lt;/code&gt; and &lt;code&gt;+150&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;The function we created is not very useful if it always draws the tree in the same place. &lt;strong&gt;Let&apos;s fix that&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.8&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;tree(-150); // left tree
tree(0); // center tree
tree(+150); // right tree

function tree(offset) {
  // centered on 300 + offset
  rectangle(290 + offset, 300, 20, 50, &apos;chocolate&apos;);
  triangle(300 + offset, 300, 100, 100, &apos;green&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;When we define a function, we can declare &lt;strong&gt;&lt;em&gt;parameters&lt;/em&gt;&lt;/strong&gt; (sometimes called &lt;em&gt;arguments&lt;/em&gt;) to &lt;strong&gt;specify variations&lt;/strong&gt;: changes in the code that will be run.&lt;/p&gt;
&lt;p&gt;To know what value to use as the offset, we look at how the function is used, e.g. &lt;code&gt;tree(150)&lt;/code&gt; means that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;offset&lt;/code&gt; will be &lt;code&gt;150&lt;/code&gt;, so&lt;/li&gt;
&lt;li&gt;&lt;code&gt;290 + offset&lt;/code&gt; will be &lt;code&gt;290 + 150 = 440&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And &lt;code&gt;440&lt;/code&gt; pixels from the left edge is where the rectangle for the trunk of the right tree starts.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;&lt;code&gt;tree&lt;/code&gt;&lt;/strong&gt; function now &lt;strong&gt;knows where to put its rectangle and triangle&lt;/strong&gt;, &lt;strong&gt;based on the &lt;code&gt;offset&lt;/code&gt; parameter&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Simplifying&lt;/h2&gt;
&lt;p&gt;It&apos;s more intuitive to say &quot;put a tree at &lt;code&gt;x=450&lt;/code&gt;&quot; than &quot;put a tree 150 pixels after 300 pixels&quot;.&lt;/p&gt;
&lt;p&gt;We can make both our function and our usage simpler, by allowing &lt;code&gt;tree(x)&lt;/code&gt; to put the tree directly at &lt;code&gt;x&lt;/code&gt; rather than &lt;code&gt;300 + x&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;tree(100);
tree(300);
tree(500);

function tree(x) {
  // centered on x
  rectangle(x - 10, 300, 20, 50, &apos;chocolate&apos;);
  triangle(x, 300, 100, 100, &apos;green&apos;);
}

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Now &lt;code&gt;tree(100)&lt;/code&gt; creates a tree whose center is &lt;code&gt;100&lt;/code&gt; pixels from the left.&lt;/p&gt;
&lt;p&gt;:::note[Why are we subtracting from x?]
The reason we have &lt;code&gt;x - 10&lt;/code&gt; is to center the rectangle.&lt;/p&gt;
&lt;p&gt;If the rectangle is &lt;code&gt;20&lt;/code&gt; wide, and we want to center it at &lt;code&gt;100&lt;/code&gt;, that means the rectangle should start at &lt;code&gt;90&lt;/code&gt; and end at &lt;code&gt;110&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;How do we get to &lt;code&gt;90&lt;/code&gt; from &lt;code&gt;x = 100&lt;/code&gt;? The answer is &lt;code&gt;x - 10&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You&apos;ll be seeing a lot of unintuitive code like this when it comes to graphics (drawings). If you&apos;re curious, try to reason about how you would do a similar action, write it in code, and see if it matches!
:::&lt;/p&gt;
&lt;p&gt;And we can do the same for y:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.8&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;tree(100, 350);
tree(300, 350);
tree(500, 350);

// now we can fit more!
tree(200, 300);
tree(400, 300);

function tree(x, y) {
  // centered on x, rooted at y.
  rectangle(x - 10, y - 50, 20, 50, &apos;chocolate&apos;);
  triangle(x, y - 50, 100, 100, &apos;green&apos;);
}

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You can now use &lt;code&gt;tree&lt;/code&gt; as an instruction!&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Functions are themselves instructions, and can be used in other functions.&lt;/p&gt;
&lt;p&gt;For example, we can make a &lt;code&gt;forest&lt;/code&gt; function that uses our new &lt;code&gt;tree&lt;/code&gt; function, several times.&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.8&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;forest(350)

function forest(y) {
  tree(100, y);
  tree(300, y);
  tree(500, y);

  tree(200, y - 50);
  tree(400, y - 50);
}
function tree(x, y) {
  rectangle(x - 10, y - 50, 20, 50, &apos;chocolate&apos;);
  triangle(x, y - 50, 100, 100, &apos;green&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;This produces exactly the same result as our previous example.&lt;/p&gt;
&lt;p&gt;But it&apos;s now in a &lt;strong&gt;function&lt;/strong&gt;, which means we can have &lt;strong&gt;more fun&lt;/strong&gt; with &lt;strong&gt;less effort&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.8&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;forest(350)
// more forests!
forest(525)
forest(175)

function forest(y) {
  tree(100, y);
  tree(300, y);
  tree(500, y);

  tree(200, y - 50);
  tree(400, y - 50);
}
function tree(x, y) {
  rectangle(x - 10, y - 50, 20, 50, &apos;chocolate&apos;);
  triangle(x, y - 50, 100, 100, &apos;green&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Imagine how many lines of code that would be if we didn&apos;t use functions!&lt;/p&gt;
&lt;p&gt;It&apos;s 15 rectangles and 15 triangles, all with different positions. It would be a mess:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.8&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;rectangle(90, 300, 20, 50, &apos;chocolate&apos;);
triangle(100, 300, 100, 100, &apos;green&apos;);
rectangle(290, 300, 20, 50, &apos;chocolate&apos;);
triangle(300, 300, 100, 100, &apos;green&apos;);
rectangle(490, 300, 20, 50, &apos;chocolate&apos;);
triangle(500, 300, 100, 100, &apos;green&apos;);
rectangle(190, 250, 20, 50, &apos;chocolate&apos;);
triangle(200, 250, 100, 100, &apos;green&apos;);
rectangle(390, 250, 20, 50, &apos;chocolate&apos;);
triangle(400, 250, 100, 100, &apos;green&apos;);
rectangle(90, 475, 20, 50, &apos;chocolate&apos;);
triangle(100, 475, 100, 100, &apos;green&apos;);
rectangle(290, 475, 20, 50, &apos;chocolate&apos;);
triangle(300, 475, 100, 100, &apos;green&apos;);
rectangle(490, 475, 20, 50, &apos;chocolate&apos;);
triangle(500, 475, 100, 100, &apos;green&apos;);
rectangle(190, 425, 20, 50, &apos;chocolate&apos;);
triangle(200, 425, 100, 100, &apos;green&apos;);
rectangle(390, 425, 20, 50, &apos;chocolate&apos;);
triangle(400, 425, 100, 100, &apos;green&apos;);
rectangle(90, 125, 20, 50, &apos;chocolate&apos;);
triangle(100, 125, 100, 100, &apos;green&apos;);
rectangle(290, 125, 20, 50, &apos;chocolate&apos;);
triangle(300, 125, 100, 100, &apos;green&apos;);
rectangle(490, 125, 20, 50, &apos;chocolate&apos;);
triangle(500, 125, 100, 100, &apos;green&apos;);
rectangle(190, 75, 20, 50, &apos;chocolate&apos;);
triangle(200, 75, 100, 100, &apos;green&apos;);
rectangle(390, 75, 20, 50, &apos;chocolate&apos;);
triangle(400, 75, 100, 100, &apos;green&apos;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Not only would it be &lt;strong&gt;harder to tell what&apos;s going on&lt;/strong&gt; just by reading the code (are those trees, or pistacho chocolate bars?), but it would also be more &lt;strong&gt;time consuming to make changes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Imagine we wanted to change the color of our tree trunk to &lt;code&gt;brown&lt;/code&gt;: we&apos;d have to change 15 lines, instead of just 1 in the &lt;code&gt;tree&lt;/code&gt; function!&lt;/p&gt;
&lt;p&gt;Hopefully you now understand why &lt;strong&gt;functions are in your best interest, even if it seems like an extra step&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Library&lt;/h2&gt;
&lt;p&gt;To achieve something complex, you want to have a few good functions available.&lt;/p&gt;
&lt;p&gt;Sometimes you might find that someone else already wrote some functions for you to use. In programming, we call this a &lt;strong&gt;&lt;em&gt;library&lt;/em&gt;: a reusable source of knowledge we can leverage&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;:::note[You&apos;re already using a library]
To make this blog post, I wrote a small library for you: &lt;code&gt;rectangle&lt;/code&gt;, &lt;code&gt;triangle&lt;/code&gt;, and &lt;code&gt;circle&lt;/code&gt; are themselves just functions!&lt;/p&gt;
&lt;p&gt;You can click on &quot;Open Sandbox&quot; in any of these editors, and open &lt;code&gt;index.html&lt;/code&gt;, to see how they are defined.&lt;/p&gt;
&lt;p&gt;Precisely because it&apos;s a library, you don&apos;t need to understand the details, and can simply use the functions as they are.
:::&lt;/p&gt;
&lt;p&gt;So &lt;strong&gt;let&apos;s build a library&lt;/strong&gt; for your drawing needs!&lt;/p&gt;
&lt;p&gt;We already have functions for trees and forests, let&apos;s add more.&lt;/p&gt;
&lt;h3&gt;Backdrop&lt;/h3&gt;
&lt;p&gt;Every painting needs a backdrop.&lt;/p&gt;
&lt;p&gt;This &lt;strong&gt;doesn&apos;t need to be a function&lt;/strong&gt;, as we &lt;strong&gt;only need one&lt;/strong&gt; backdrop, but &quot;drawing the backdrop&quot; is a &lt;strong&gt;reasonable instruction&lt;/strong&gt; to make our life easier, later.&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();

function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;We drew the sky.&lt;/p&gt;
&lt;p&gt;A rectangle that fills the screen: starts at the top left corner (0, 0), and is the same size as the canvas (600 wide, and 500 pixels high).&lt;/p&gt;
&lt;p&gt;Or is it an ocean, or a lake? Adding a sun would help clarify that.&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();

function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Note that the sun &lt;code&gt;circle&lt;/code&gt; can go on top of the sky &lt;code&gt;rectangle&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Instructions happen in a sequence&lt;/strong&gt;, order matters: if you first draw a blue rectangle, and then a yellow circle on top, you can see the yellow circle.&lt;/p&gt;
&lt;p&gt;If you do it the other way around, the rectangle covers the circle and you don&apos;t see it. You can try it, by putting the rectangle after the circle in the editor above.&lt;/p&gt;
&lt;p&gt;Now we just need some surface to put trees on:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();

function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;:::note[What are these colors?]
If you wonder where I get colors like &quot;chocolate&quot;, &quot;aqua&quot;, and &quot;olivedrab&quot;, you can find the list &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/named-color&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Feel free to play with other colors, or &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value&quot;&gt;other color formats&lt;/a&gt;.
:::&lt;/p&gt;
&lt;p&gt;We have a backdrop! Let&apos;s see how we would use it.&lt;/p&gt;
&lt;p&gt;Adding the trees is as easy as &lt;em&gt;calling&lt;/em&gt; (executing) our &lt;code&gt;tree&lt;/code&gt; function:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
tree(100, 380);
tree(200, 350);
tree(250, 465);

function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}

function tree(x, y) {
  rectangle(x - 10, y - 50, 20, 50, &apos;chocolate&apos;);
  triangle(x, y - 50, 100, 100, &apos;green&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s remove the trees for now, and work on another function in our library.&lt;/p&gt;
&lt;h3&gt;Cloud&lt;/h3&gt;
&lt;p&gt;Clouds look nice in paintings! Especially when they&apos;re all puffy.&lt;/p&gt;
&lt;p&gt;A simple way to approximate a puffy shape, is with &lt;strong&gt;a few circles&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
cloud(150, 150);

function cloud(x, y) {
  // big center puff
  circle(x, y, 20, &apos;white&apos;);

  // small left puff
  circle(x - 20, y + 10, 10, &apos;white&apos;);

  // medium right puff
  circle(x + 20, y + 5, 15, &apos;white&apos;);
}


function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;That looks nice! A cloud centered on &lt;code&gt;x=150&lt;/code&gt;, and &lt;code&gt;y=150&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Once we have the &lt;strong&gt;function&lt;/strong&gt; for it, we can add &lt;strong&gt;as many clouds as we like&lt;/strong&gt;, with little effort:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
cloud(100, 50);
cloud(150, 100);
cloud(250, 50);

function cloud(x, y) {
  // big center puff
  circle(x, y, 20, &apos;white&apos;);

  // small left puff
  circle(x - 20, y + 10, 10, &apos;white&apos;);

  // medium right puff
  circle(x + 20, y + 5, 15, &apos;white&apos;);
}


function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;h3&gt;Mountain&lt;/h3&gt;
&lt;p&gt;The most visually pleasing paintings, in my opinion, are landscapes with mountains.&lt;/p&gt;
&lt;p&gt;So here&apos;s a simplified mountain: &lt;strong&gt;two overlapping triangles&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let&apos;s make a function with it:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
mountain(200, 250);

function mountain(x, y) {
  // base
  triangle(x, y, 120, 100, &apos;saddlebrown&apos;);

  // snow cap
  triangle(x, y - 50, 60, 50, &apos;white&apos;);
}


function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Once again, now that we have the function for one mountain, we can add multiple mountains!&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
mountain(200, 250);
mountain(50, 250);
mountain(100, 250);


function mountain(x, y) {
  // base
  triangle(x, y, 120, 100, &apos;saddlebrown&apos;);

  // snow cap
  triangle(x, y - 50, 60, 50, &apos;white&apos;);
}
function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;This doesn&apos;t look great because the mountains are all the same size, but that&apos;s a problem for a future article.&lt;/p&gt;
&lt;p&gt;If you&apos;d like some practice, see what you can do about it!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;hint: add a &lt;code&gt;h&lt;/code&gt; parameter to &lt;code&gt;mountain&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;House&lt;/h3&gt;
&lt;p&gt;We have methods to draw the sky, a sun, grass, trees, and mountains.&lt;/p&gt;
&lt;p&gt;A house would fit well!&lt;/p&gt;
&lt;p&gt;This will be our most complex drawing element yet. Let&apos;s construct it step by step:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
house(300, 300);

function house(x, y) {
  // walls
  rectangle(x - 50, y - 75, 100, 75, &apos;lightgrey&apos;);

  // roof
  triangle(x, y - 75, 120, 40, &apos;brown&apos;);
}


function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;That&apos;s a very basic house, let&apos;s add a door and a doorknob:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
house(300, 300);

function house(x, y) {
  // walls
  rectangle(x - 50, y - 75, 100, 75, &apos;lightgrey&apos;);

  // roof
  triangle(x, y - 75, 120, 40, &apos;brown&apos;);

  door(x - 15, y);
}
function door(x, y) {
  // door
  rectangle(x - 12.5, y - 40, 25, 40, &apos;peru&apos;);

  // doorknob
  circle(x - 6, y - 20, 3, &apos;saddlebrown&apos;);
}


function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Once you have one house, you can have as many houses as you can fit, with little extra effort!&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();
house(300, 300);
house(150, 400);
house(450, 350);

function house(x, y) {
  // walls
  rectangle(x - 50, y - 75, 100, 75, &apos;lightgrey&apos;);

  // roof
  triangle(x, y - 75, 120, 40, &apos;brown&apos;);

  door(x - 15, y);
}
function door(x, y) {
  // door
  rectangle(x - 12.5, y - 40, 25, 40, &apos;peru&apos;);

  // doorknob
  circle(x - 6, y - 20, 3, &apos;saddlebrown&apos;);
}

function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;h3&gt;All together&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;We&apos;ve built a library&lt;/strong&gt; of shapes to use in a painting, now it&apos;s just a matter of drawing the painting we want!&lt;/p&gt;
&lt;p&gt;Let&apos;s start by drawing &lt;strong&gt;one of each shape&lt;/strong&gt;, so we know what we&apos;re working with:&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// Our top-level instructions.
// These alone give a good idea about
//  what the program is doing

backdrop();

cloud(100, 100);
mountain(200, 250);

tree(150, 450);
house(450, 350);

// Our function definitions.
// These are &quot;details&quot; on how to implement
//  the top-level instructions

function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
function cloud(x, y) {
  // big center puff
  circle(x, y, 20, &apos;white&apos;);

  // small left puff
  circle(x - 20, y + 10, 10, &apos;white&apos;);

  // medium right puff
  circle(x + 20, y + 5, 15, &apos;white&apos;);
}
function mountain(x, y) {
  // base
  triangle(x, y, 120, 100, &apos;saddlebrown&apos;);

  // snow cap
  triangle(x, y - 50, 60, 50, &apos;white&apos;);
}
function tree(x, y) {
  rectangle(x - 10, y - 50, 20, 50, &apos;chocolate&apos;);
  triangle(x, y - 50, 100, 100, &apos;green&apos;);
}
function house(x, y) {
  // walls
  rectangle(x - 50, y - 75, 100, 75, &apos;lightgrey&apos;);

  // roof
  triangle(x, y - 75, 120, 40, &apos;brown&apos;);

  door(x - 15, y);
}
function door(x, y) {
  // door
  rectangle(x - 12.5, y - 40, 25, 40, &apos;peru&apos;);

  // doorknob
  circle(x - 6, y - 20, 3, &apos;saddlebrown&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;Now we can re-use them and &lt;strong&gt;lay them out&lt;/strong&gt; as needed.&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.9&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;backdrop();

cloud(100, 50);
cloud(150, 100);
cloud(250, 50);

mountain(200, 250);
mountain(50, 250);
mountain(100, 250);

tree(70, 380);
tree(210, 360);
tree(130, 420)
tree(250, 465);

house(450, 350);


function backdrop() {
  // sky
  rectangle(0, 0, 600, 500, &apos;aqua&apos;);

  // sun
  circle(500, 100, 30, &apos;yellow&apos;);

  // ground/grass
  rectangle(0, 250, 600, 250, &apos;olivedrab&apos;);
}
function cloud(x, y) {
  // big center puff
  circle(x, y, 20, &apos;white&apos;);

  // small left puff
  circle(x - 20, y + 10, 10, &apos;white&apos;);

  // medium right puff
  circle(x + 20, y + 5, 15, &apos;white&apos;);
}
function mountain(x, y) {
  // base
  triangle(x, y, 120, 100, &apos;saddlebrown&apos;);

  // snow cap
  triangle(x, y - 50, 60, 50, &apos;white&apos;);
}
function tree(x, y) {
  rectangle(x - 10, y - 50, 20, 50, &apos;chocolate&apos;);
  triangle(x, y - 50, 100, 100, &apos;green&apos;);
}
function house(x, y) {
  // walls
  rectangle(x - 50, y - 75, 100, 75, &apos;lightgrey&apos;);

  // roof
  triangle(x, y - 75, 120, 40, &apos;brown&apos;);

  door(x - 15, y);
}
function door(x, y) {
  // door
  rectangle(x - 12.5, y - 40, 25, 40, &apos;peru&apos;);

  // doorknob
  circle(x - 6, y - 20, 3, &apos;saddlebrown&apos;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;It&apos;s not going to win any art competitions, but that&apos;s not the point!&lt;/p&gt;
&lt;p&gt;We made a &lt;strong&gt;small project with some complexity, out of simple building blocks, thanks to functions&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Functions are sequences of instructions, that we can label and reuse.&lt;/p&gt;
&lt;p&gt;They are smaller programs (e.g. drawing only a house) inside our bigger program (e.g. drawing the whole painting), that help us keep our code easier to write, understand, and modify.&lt;/p&gt;
&lt;p&gt;What we&apos;ve been working with isn&apos;t a &quot;dumbed down&quot; version of functions. This is what it looks like in &quot;real&quot; code too!&lt;/p&gt;
&lt;p&gt;Our instructions have exclusively been about drawing rectangles, circles, triangles, and other groups of them, e.g. &lt;code&gt;door(x, y)&lt;/code&gt;, but &lt;strong&gt;our program is by all means a real program&lt;/strong&gt;, these are real instructions that come from a library of basic shapes.&lt;/p&gt;
&lt;h3&gt;What next?&lt;/h3&gt;
&lt;p&gt;You have now understood the concept of functions, which is the important part.&lt;/p&gt;
&lt;p&gt;If this was new to you, I recommend you take some time to internalize the concept. Use the editor below and make your own unique painting!&lt;/p&gt;
&lt;p&gt;&amp;lt;Editor scale=&quot;.8&quot;&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;// Make your own painting!

// rectangle(x, y, width, height, color);
// triangle(x, y, width, height, color);
// circle(x, y, radius, color);
// function newInstructionName(x, y) { ... }

// WARNING:
//  Your code will be lost if you refresh or close
//  this page.
//
// To save your code and the drawing
// - click on &quot;Open Sandbox&quot; in the bottom right
// - copy the URL
// - store it somewhere, or share it with the
//   community in the comments at the bottom
//
// Feel free to delete these grey lines
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;/Editor&amp;gt;&lt;/p&gt;
&lt;p&gt;I&apos;m working on new articles so you can learn about loops with the same setup, hold tight!&lt;/p&gt;
&lt;p&gt;In the meantime, you can have a look at these (more advanced) resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions&lt;/li&gt;
&lt;li&gt;https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><author>Matei Copot</author></item></channel></rss>