The post I’m Supposed to Know appeared first on Programming Zen.
]]>This mindset actively discourages the act of looking up information, which is essential for learning.
Imagine that you’re a web developer working on a project that requires the implementation of SSO/IdP. A voice inside tells you, “I’m a professional web developer. I’m supposed to know how to do this already.”
You might spend hours trying to figure it out entirely on your own instead of taking advantage of all the help you can get. And this further adds to your feelings of inadequacy or your Impostor Syndrome.
I suspect technologies like Copilot and watsonx Code Assistant will really challenge those who struggle with this. Remember, it doesn’t matter if you had to look it up. If you got it done, you got it done. This isn’t the Olympics where outside help disqualifies you. Looking up things is an integral part of being a programmer.
(I readily acknowledge that these tools are useful but still being developed and their suggestions can still be inaccurate or suboptimal, but I think the point stands.)
Embrace the mindset that “it’s okay not to know everything; get it done” and such tools become playgrounds for learning and being more productive. If you take the “I’m supposed to know” approach you’ll just see them as crutches and miss out on their potential. Always watch out for psychological barriers. They can make or break you.
The post I’m Supposed to Know appeared first on Programming Zen.
]]>The post Internship at IBM: A Life-Changing Experience Awaits You appeared first on Programming Zen.
]]>My team at IBM is offering a range of internship positions starting in January, and we want you to be a part of our team. This isn’t just another internship; it’s a life-changing opportunity that comes highly recommended by every intern we’ve ever had.
Before you get too excited, let’s make sure you meet the following criteria:
Here’s how to get started:
Don’t miss out on this incredible opportunity to work at IBM, where your contributions will be used by millions of people worldwide. Apply now and take the first step towards a fulfilling and impactful career!
The post Internship at IBM: A Life-Changing Experience Awaits You appeared first on Programming Zen.
]]>The post Prompt Engineering for Everyone: My New Course appeared first on Programming Zen.
]]>Whether you’re a seasoned developer or just curious about AI, this course is designed to change the way you interact with conversational AI.
I remember the first time I used an LLM (Large Language Model). I was amazed but I also quickly realized that my input had a profound effect on the quality and accuracy of the output.
It’s not just about asking; it’s about asking the right way. That’s the essence of Prompt Engineering, a fancy term that essentially means communicating effectively with AI models to optimize for the desired results.
Whether you like AI or not, whether you think it’s useful, scary, or both, AI is here to stay and it will revolutionize many fields, including our own. I think it is wise to get familiar with it and this prompt engineering course should give you a gentle introduction.
My prompt engineering course is jam-packed with insights and practical skills.
You’ll learn how to craft compelling prompts that make your AI interactions more accurate, meaningful, and ultimately useful.
It is all delivered in plain English and it doesn’t take a data scientist or developer to use the tips shared within.
Specifically, you’ll learn:
Plus, you’ll get a certificate, such as the one below (provided you obtain a passing grade).
So, are you ready to improve your AI interactions? I invite you to join me on this exciting journey. Enroll in Prompt Engineering for Everyone and let’s make AI communication as useful as it can be.
The post Prompt Engineering for Everyone: My New Course appeared first on Programming Zen.
]]>The post New IBM Internship Opportunities for Canadian Students appeared first on Programming Zen.
]]>It’s been a while since I last posted on this blog, but I’m back and ready to write about all things related to programming, technology, AI, and of course, everyone’s favorite tool ChatGPT.
There have been quite a few “events” in my life since we last chatted (including separating, selling the house, and moving to a new city). But through it all, I’ve remained passionate about technology and the ways in which it can change our lives for the better.
Speaking of change, as an engineering manager for IBM’s Skills Network team am excited to announce that we’re currently offering four new internships for Canadian students (six positions in total). These internships are an incredible opportunity for those looking to break into the tech industry and make a real impact. Here’s a quick rundown of the positions available:
Our past interns have had amazing experiences working with our team, learning a lot, and many of them have gone on to have career-changing roles in the industry. We’re dedicated to helping our interns grow and develop, and this internship is a great opportunity to do just that.
To be eligible for this opportunity, you must be currently enrolled in a university or college, reside in Canada, and be able to commit to a full-time 8-month internship starting in May and ending in December 2023. Please note that NO EXCEPTIONS will be made for these requirements, unfortunately.
Don’t miss out on this amazing opportunity to learn, grow, and start your career with IBM. Apply now at the links provided above. And if you’re not already a subscriber, be sure to subscribe to this blog in the blue box below, so you don’t miss out on any future posts.
Best of luck to everyone who applies!
The post New IBM Internship Opportunities for Canadian Students appeared first on Programming Zen.
]]>The post Get an Internship With My Team at IBM appeared first on Programming Zen.
]]>When I asked for quotes from our current interns on the team, here is what they had to say:
“Why are you wasting time writing a post.” — John
“I’m debugging here.” — Samantha
“For Pete’s sake Antonio, it’s 3 am in the morning.” — Tyler
Jokes aside, our current (and past) interns absolutely love their experience in our team at IBM.
In order to make this as clear as possible, I’m going to explain things in a FAQ format.
Q: What are the requirements?
You must be:
Q: What roles are available?
Apply by clicking on the links above.
Q: Can I apply for more than one position?
Yes! For example, if you are fine with both 4 and 8-month development internships, you can apply to both positions.
Q: How many positions are available in total?
We are hiring 10 interns in total.
Q: Do I have to be enrolled in a co-op program?
No. Despite what the job postings say, co-op enrollment is preferred but not required.
Q: Is this going to be a remote position?
It’s hard to predict the future when it comes to the COVID-19 pandemic. These internship positions will definitely start off remote, but there is a small chance (for the 8-month positions, at least) that you’ll be required to go back to the office when it’s safe to do so. The office is located in Markham, ON, Canada. If it comes to that, at the time, out-of-province students will receive relocation assistance.
Q: Who are you looking for?
We are looking for enthusiastic students who are passionate about technology. In my experience, the most successful candidates are resourceful and will employ all tools available to succeed in their job (including mentorship and support from our senior developers and data scientists).
Q: How big is the team?
We currently have about 20-25 people on the team, divided for the most part between data scientists and developers. Half of our developers and data scientists are interns, so we put a lot of emphasis on growing interns into fully qualified developers and data scientists. Most of our full-time regular team members were interns in our team at some point in the past.
Q: I don’t have all the skills listed in the job posting, can I still apply?
Think of the “preferred” skills listed as a wishlist for the perfect candidate. The perfect candidate might not exist, however. So apply if you have an interest in the job and you have at least one or two of the required skills listed.
Q: What’s the hiring process like?
We don’t have a whole lot of time. May is coming fast. So if you are interested, seize the opportunity and apply now for an internship at IBM! I look forward to speaking with you.
The post Get an Internship With My Team at IBM appeared first on Programming Zen.
]]>The post What to Study to Become a Web Developer appeared first on Programming Zen.
]]>In the previous article on front-end vs back-end developers, I covered the existence of front-end and back-end technologies, which in turn have many options to choose from.
Too many options, in fact. How do we go about choosing what to study? And what about all the other stuff web developers tend to know, such as the command line, Git, and other developer tools?
When you are beginning in this field, not only you do not know a wide range of things, you are likely also unaware of what you don’t yet know.
As such, my goal for this section of the guide is to give you a list of things you should get acquainted with, along with some rationale for why you’d opt for those versus other possible choices.
This list of what to study to become a web developer is necessarily incomplete (I don’t even list learning to debug), but fear not! You will pick up other skills and tools organically in the process of studying these key topics.
In the next article in the guide, we’ll discuss how to go about learning those needed elements as well.
As far as the web is concerned, front-end means three main technologies:
You need to become familiar with all three of these areas if you’re going to have much of a hope of getting job as a web developer.
If you don’t plan to become a front-end developer, you might get away with a superficial knowledge of CSS (and to some extent JavaScript). However, you should still have a fundamental understanding of both.
For CSS, you should become acquainted with both the Flexbox model and Grid layout. While these terms might not mean much to you yet, they will become familiar as soon as you take a course, read a book, or peruse documentation on CSS.
If you plan on becoming a front-end developer, then you need to be quite decent at CSS.
Learn HTML, CSS, and JavaScript regardless of what development role (e.g., front-end, back-end, or full-stack) you may ultimately end up taking on in your career.
In the beginning of your journey, simply focus on these three in their plain/vanilla form. For example, don’t try to go for fancy JavaScript frameworks like React and Vue right out of the gate.
The only frameworks you might want to explore at this stage are CSS ones like Bootstrap and TailwindCSS, and an old school JavaScript library (i.e., jQuery), to see what they have to offer over vanilla CSS and JavaScript.
What they don’t do is introduce a whole host of new and confusing concepts (like React does), which are best tackled once you have a decent mastery of the front-end trifecta (i.e., HTML, CSS, and JavaScript).
After you’ve spent a couple of months grasping the fundamentals of HTML, CSS, and JavaScript, I’d recommend that you start exploring a back-end development language and framework.
You’ll quickly find that front-end alone limits the type of web applications you can build a fair bit. Want to permanently save and retrieve the data the user gave you? You need back-end tools.
Adding back-end development skills will allow you to create much more useful web applications, as well as to better understand the other side of the coin.
This is useful even if you decide to specialize in front-end development because you’ll most likely be working with back-end developers and interacting with their work from your front-end code.
So far there hasn’t been much controversy in this article. Just about everyone can agree that learning HTML, CSS, and JavaScript is a must. Some will fight me on my suggestion of putting off React or Vue until later (or think that looking into jQuery in 2020 is silly), but nothing as of yet has been truly controversial.
Sides are about to be drawn, however, as I proceed to tell you what to study for the back-end side of things. There are countless possible options out there. At least a dozen of which are squarely reasonable choices.
Some of the most worthwhile candidates include:
If you already know, or have a hunch, that you will focus on front-end development, I recommend using a JavaScript server-side framework like Express.js.
This will further solidify your JavaScript skills and will enable you to build complete web applications (and APIs that your front-end can then consume).
I’m personally not a huge fan of server-side JavaScript (or JavaScript in general), but if you know that you want to become a front-end developer you must become as skilled as you possibly can in JavaScript. It is, hands down, the number one skill that you’ll need to master in this field.
I would skip the JavaScript and Express.js stack if any of the followings apply to you:
If that’s you, I recommend that you consider Python and its associated framework, Django.
Python is one of the most popular programming languages in the world and it is quite pleasant to work with. Nowadays, it is almost a given that most well-rounded programmers will know Python.
It’s also the ideal language to have at the ready, should you develop an interest in data science and machine learning down the line.
The most popular frameworks to build web applications in for Python are Flask and Django. Ideally, you’ll want to learn both, but to begin with, I would suggest you focus on Django.
Why Django? It’s highly productive which means that you’ll be able to create fancier web applications with less work, which can be quite motivating when you are starting out. It also ships with a lot of sensible conventions that will in turn teach you how to structure and how to think about the architecture of your web application.
Flask is excellent too and likely the better tool if one is focusing on building small apps and APIs. That said, it is best used once you have a better understanding of how web applications work.
What about Ruby and Ruby on Rails? They are also an excellent choice and my favorite among the options listed here. However, Ruby is not quite as popular as Python, and it is mostly used within the scope of web development.
With Python you get a very similar programming language, plus access to all the data science goodies that are not readily available in Ruby.
Should you decide to pick up Ruby and Ruby on Rails down the line, it will be quite easy coming from a Python and Django background.
As you go through this process, regardless of the language and framework you choose, you must become well acquainted with the REST paradigm which will teach you about HTTP requests and responses, HTTP methods, and response codes.
You’ll also need to become acquainted with databases. For the most part, you’ll have to master the fundamentals of:
Mongo is overused. However, it is common and easy enough to learn, so it can certainly be worth picking up. PostgreSQL, on the other hand, is fantastic and an obvious recommendation.
Once you have an SQL foundation in place, you can switch with relative ease to other relational databases, should a project or employer require it.
The front-end and back-end stacks outlined above are enough to make you useful and capable of landing your first job in tech.
There are however several other skills which are taken for granted. If you are not too familiar with them, you’ll want to invest some time in learning these areas as well.
ls
, cat
, echo
, source
, ps
,top
, grep
, find
, curl
, etc.I suspect you’ll pick up many of these skills automatically as you study the rest of the stuff mentioned earlier on.
Just make sure to supplement as needed so that you are not entirely unfamiliar with any of the concepts listed here.
Once you have all of these skills above under your belt, you might be ready to tackle more advanced areas.
If you decide to become a front-end developer, I suggest looking into:
If you decide to become a back-end or full-stack developer, I’d recommend exploring more in depth:
Note that for all of the technologies I’ve mentioned here, this list is still not an exhaustive one by any means. This is by design, as it really doesn’t need to be all-encompassing. Most professional web developers have not mastered every entry on this list.
So, if you decide to become a front-end developer, mostly ignore the advanced back-end stuff, and focus on the front-end skills.
Conversely, if you decide to become a back-end developer, focus on the advanced back-end skills by studying, practicing, and building projects without worrying too much about the advanced front-end skills side of things.
You just need to become really good at the key components for the role you decide to take, while not being entirely unfamiliar with the rest of the entries on this list.
Now that you know what you should be studying, we need to address how to actually go about studying it.
Do you need a degree to become a web developer? Should you enroll in a development bootcamp? We’ll cover these questions and much more in the next article in this multi-part guide.
Stay tuned and don’t forget to subscribe, if you haven’t done so ready.
The post What to Study to Become a Web Developer appeared first on Programming Zen.
]]>The post Front-End vs Back-End Developer appeared first on Programming Zen.
]]>If you want to learn to code so that you can become a web developer, welcome. You’re in the right place.
Before we discuss what kind of web developer positions are available and what the differences between front-end, back-end, full-stack, and DevOps are, I’m going to take the scenic route and start with what coding is.
This is necessary because I make virtually no assumptions about your existing knowledge. If you are an absolute beginner, this is the guide for you.
Coding is the act of writing code to program machines like computers and mobile devices. OK, what is code then? Code is the set of precise instructions we give to said machines to execute the actions we want them to take.
The instructions need to be precise because computers, unlike humans, cannot make a bunch of assumptions on the basis or prior experience.
If I asked you to draw a house, you’d probably start jotting down something reminiscent of what a 5 year old would draw. You’ll start with a box, add a pointy roof, a door, a window, etc. If you are really artistically inclined, you might draw a 3D version that looks nicer. In either case, you will be able to handle my generic, open-ended request and deliver something that satisfies it.
Generally speaking, the computer cannot assume what the house should look like, as you would. How thick should the lines be? What color (if any at all) should be used? How big should the house be? What style? And so on.
In short, a computer didn’t draw houses in kindergarten. Yes, it can draw amazingly intricate houses with fantastic degrees of detail, but you’ll need code that very precisely instructs it to do so.
Consider the calculator application that is installed by default on your computer.
A programmer wrote a bunch of code so that when you click on the Calculator icon, the computer launches the application on your screen, presenting you with a series of numbers and operators to choose from.
As you interact with the application, for example by pressing 6
, x
, 7
and =
, the computer, instructed by the programmer’s code, will know what to do. (Namely, multiplying the two numbers and displaying the result for you.)
Some computer programs do not have a visual user interface at all, in which case we do not call them applications.
That’s the main difference between a program and an application. They both require code, but only applications have some kind of visual user interface that the user can interact with.
The user interface (UI) doesn’t have to be a window within your desktop operating system (e.g., Windows or MacOS). It can be on your mobile device or even a web page that you access through a web browser like Chrome or Firefox.
An application that you access on your desktop computer is called… drum roll… a desktop application. One that you access on your mobile device (e.g., Apple or Android smartphone) is called a mobile application. And one that you access through a web browser? You guessed it, a web application.
It turns out that the type of code we must write to create these different types of applications is somewhat different depending on the type of application we are creating.
Many of the concepts are the same but the programming languages, libraries (essentially, prewritten code), tools, and problems you’ll face as a programmer will be different depending on which platform you are targeting.
This is why professional programmers will often specialize in one or maybe two of these types of application development. So, you can be a desktop developer (less common these days), a mobile developer, or a web developer.
Sometimes, you’ll hear the term “app developer” which is a synonym for a mobile developer, given that “app” is often used to specifically refer to mobile applications.
Some programmers specialize even further, and are just iOS developers or Android developers, depending on the type of mobile devices they target.
Since not all programs are applications, it’s worth noting that there are many other types of developers who don’t work on applications.
For example, those who work on the operating system itself, programs that facilitate networks of computers to communicate, or code that enables hardware components to communicate with each other.
There are plenty of viable careers to be had in mobile and other types of development, however since the aim of this guide is to help you become a web developer, we are going to focus on this particular subset of the development landscape.
Twenty-five years ago, the majority of developers were desktop developers (or a specialized version, like a Windows developer).
Over the past two decades, the web exploded in popularity. So it might reassure you to know that today the overwhelming majority of programmers are web developers.
The web is certainly not going anywhere, so the skills you acquire will serve you well for a long time to come.
Alright, let’s focus on web applications. What are they and how do they work?
Let’s start with a simple web page, rather than a full-blown web application. When you visit https://antoniocangiano.com, my homepage, you are visiting a very simple static page.
My homepage is a so-called “static page” because it doesn’t dynamically change. For example, it doesn’t pull the data from a database like when you search for a product on Amazon.
It’s just a static document containing some text, images, and links organized in a somewhat logical and pleasing (if minimalist) manner.
When the web first come about in the early 90s, that’s all it was for the most part. A bunch of static pages linking to each other.
When server-side dynamic web pages became common, it transformed the web. We could now, among other things, collect information from the user, store it in a database, and dynamically display to the user content on the basis of their request.
You could even customize the page that was rendered to the user on the basis of who was logged in, for example.
Over time, these capabilities evolved to a point where web applications can deliver rich desktop-like interfaces and user experience.
Technically, this blog you are reading is a web application written in HTML, CSS, JavaScript, and PHP. It allows me to log in as an administrator and write blog posts. It allows you to comment, search for posts, subscribe to my RSS feed, see related content, and much more.
Web applications can be as simple as a plain todo list or as complex as the online version of Microsoft Excel or an elaborate video game.
When you type https://antoniocangiano.com/
in your browser’s address bar and press enter, the following steps take place:
antoniocangiano.com
to an IP (Internet Protocol) address where the site is actually hosted. You can think of DNS as white pages for the internet, where instead of people’s names being mapped to their phone numbers, you get website names mapped to their servers’ IP addresses. Knowing the IP address of the server hosting the site will allow your browser to send the request to the right server among the millions of servers available on the internet./
. The server will grab the index.html
file for my site and send it back to your browser as a response. (On a static site, /
will typically render index.html
just like /about
would render the content of about.html
. This is by convention and not always the case.)(This is a simplification, but conceptually these are the major steps.)
There is no back-end development going on here. HTML, CSS, and client-side JavaScript are all front-end development technologies.
HTML provides the structure and content of the page. CSS determines the style of the page (font size, spacing, padding, colors, etc.). And JavaScript determines some behaviors of the page as you interact with it.
In the case of my homepage, when you move your mouse over the icons at the top, you’ll see a little tooltip pop up appear. That’s a bit of JavaScript in action.
I clarified that it’s client-side JavaScript because nowadays there is also server-side JavaScript which is indeed in the scope of back-end development. When I say “client-side”, I mean JavaScript that is executed by your browser.
Web applications are collections of dynamic pages (and sometimes dynamic and static pages). Requesting a dynamic page is conceptually similar to requesting a static page, but behind the scenes there are a few more steps taking place.
For example, let’s say that you enter “iPad” in the search box of this site and press enter. You’ll notice in the address bar that you’ve made a request for https://programmingzen.com/?s=ipad
.
There is no ipad.html
file on the server, given that you could have typed anything into the search field.
(Ignore caching for the sake of this simplification, if you are already familiar with the concept.)
So behind the scenes, instead of locating the static file and issuing it in response for the browser to render, there are two extra steps:
Ultimately, what’s sent to your browser is still a bunch of HTML, CSS, and JavaScript. However, it didn’t come from a file on your server. It was dynamically generated based on information stored in the database.
Imagine for a moment that some posts on my site were available only to subscribers. The code of the dynamic page would need to check whether the person is logged in or not, whether they are a subscriber, and then alter the response accordingly.
If the user is a subscriber, include subscriber-only iPad posts in the list, if they are not, exclude those posts and just return the free ones available to everyone.
As you can imagine, the ability to dynamically generate the response depending on certain conditions is quite powerful and is the basis of how web applications work.
In terms of technology, what did we add to the HTML, CSS, and JavaScript front-end stack? We added code to the dynamic pages which can then make calls to a database and generate a customized response. PHP and SQL code in my case.
This code can be written in a variety of programming languages, however. Some popular examples are Python, Ruby, Java, Elixir, and even server-side JavaScript.
We’ll discuss why you’d use one language over another or which to choose to land a job, in the next installment of this guide. For now, know that back-end development will require you to be familiar with a server-side programming language.
You’ll also need to know SQL and be familiar with how databases work.
Truth be told, back-end developers will need to know quite a bit more than just another programming language and databases.
For example, they’ll typically leverage a web framework like Ruby on Rails, Django, Flask, or Express.js to be more productive and write fewer lines of code to implement the features needed by the web application.
So you’ll also need to develop familiarity with whichever framework is most popular for your language of choice.
A lot of front-end developers are not writing plain JavaScript either. They too have to worry about frameworks and libraries, typically for JavaScript (and even CSS). Popular JavaScript options are React, Vue, Angular, and Ember.js.
Front-end developers will also need to worry about accessibility and providing a good user experience (UX) for the end-user. Huge topics that have dedicated specialists in their own right.
We’ll cover what you need to study in the next article of this guide.
While it is good to have an understanding of both front-end and back-end, most web developers end up specializing in either front-end or back-end.
Historically, front-end development had a certain stigma. It was perceived as easier. These days, I don’t believe this is a valid stance anymore.
The capability of web interfaces has grown dramatically over the years and so did the complexity of technologies leveraged to build such interactive and rich user interfaces.
It’s worth noting that back-end developers’ salaries still tend to be higher than front-end developers’ ones. But this might be at least in part because the majority of beginner web developers start with front-end technologies.
After all, you can’t be a back-end developer without knowing the fundamentals of HTML, CSS, and JavaScript, but you could in theory be a good front-end developer without knowing server-side languages and SQL.
Of course, exposure to both sides of the Web development line is always beneficial.
Full-Stack developers are unicorns born in an enchanted forest located where the Hanson and the Eich rivers meet.
More seriously, it’s rare for someone to be amazing at both front-end and back-end development, but there are plenty of developers who are competent at both.
Larger companies tend to prefer specialized people, because they have the resources to hire larger teams that will include both front-end and back-end developers.
Startups and other smaller businesses might only be able to have one or two developers on hand, and therefore might find a full-stack developer who can build the entire web application to be a more practical option.
Writing web applications is only one part of the equation. You then need to deploy them somewhere on the internet so that they’re available to the public. (Pushing code to production, to use common lingo.)
You also need strategies to keep them running smoothly and handle updates and new releases of the code you write.
In smaller operations, this often falls on the web developer’s shoulders. Over the years, however, the role of DevOps engineer became its own profession.
Today, larger organizations will hire DevOps specialists/engineers to work alongside developers and system operators/administrations to ensure the best deployment practices.
As you work on becoming a web developer, you’ll inevitably pick up some of the skills possessed by DevOps. However, you don’t need to become a DevOps expert, unless you discover that it’s what you enjoy the most and decide to pursue that as your career.
It’s way too early for you to commit to becoming a front-end, back-end, or full-stack developer.
The best you can do is learn the fundamentals and then decide on the basis of what you enjoy the most, what comes more naturally to you, and ultimately what you tend to be good at.
Some people might struggle with grokking databases but are capable of creating wonderful user interfaces. Others might be very good at solving algorithmic problems but fail miserably at putting together a user-friendly UI.
You’ll find out where you fit very soon.
In the next article of this How to Become a Web Developer and Get a Job guide, we’ll cover the technology stacks I recommend to maximize your chances of becoming a professional web developer and landing a job.
I’ll also discuss which languages, technologies, and tools you need to study to break into this industry.
That master list can act as a road map of skills you must acquire in the upcoming months to become a web developer.
The post Front-End vs Back-End Developer appeared first on Programming Zen.
]]>The post How to Become a Web Developer and Get a Job With No Experience (Guide) appeared first on Programming Zen.
]]>I’ll split the guide into a series of articles. Once the guide is complete, I will also make it available for free to my subscribers in PDF, EPUB, and MOBI format.
This guide is for anyone who wants to become a Web Developer and get a job as a professional developer.
The “how to become a Web Developer” portion of the guide is going to be specific to web development, but even those seeking to become other types of developers will likely benefit from its insight.
The “how to get a job as a developer” portion is much more generic and will serve you well regardless of your chosen specialization.
I’m writing this guide with two kinds of people in mind. Young people hoping to become professional developers and existing professionals who are hoping to switch careers (or who may be returning to the workforce in the case of stay-at-home parents).
These are the kinds of people I have personally helped in the past and those I have the most experience with. Nevertheless, the advice provided throughout this series should be suitable for anyone whose goal is to land a developer job.
I’ll take for granted that you have used a computer before and are somewhat web-savvy. As a litmus test of the sort, I’m assuming you know that Google Chrome and Mozilla Firefox are two browsers and can install an extension/add-on (or could figure it out by Googling it).
I’m also going to assume that you’re smart but not necessarily a genius like I am. That’s a joke, by the way, I’m not a genius. I’m a super genius. 🙂
Jokes aside, the media has created a certain stereotype of what a programmer looks like. The asocial genius wearing a hoodie can be an intimidating benchmark for those starting out.
The truth is developers come in all shapes, sizes, and forms. And although developers are reasonably smart people, being exceptionally gifted is by no means a requirement. You don’t even necessarily need to be good at math.
Technical ability, as we’ll discuss more in-depth soon, is also not the only desirable trait of a great developer. Your communication skills and ability to collaborate are just as, if not more, important.
I’m a Software Development Manager and AI Advocate at IBM. I’ve been a professional Web Developer for 20 years.
Within IBM, I’m known as the guy who got the company to adopt Rails and Django, in the early days of these technologies, and more recently I’ve been gradually doing the same for Elixir and Phoenix. (If you don’t know what any of this means, no worries, we’ll cover your options soon.)
Over the years, I’ve provided advice to countless people who were hoping to make it into our industry, many of whom I’ve personally mentored.
For the past twelve years, I’ve been doing the candidate selections for my team. As a result, I must have reviewed thousands of résumés, interviewed hundreds of developers, and hired a few dozen applicants.
I’m also the author of a couple of technical books. One on Rails for Microsoft developers (painfully obsolete at this point) and one on Technical Blogging (current and quite useful to those seeking to advance their career in tech).
Among too many other things, I’m also the author of a popular chatbot course that’s been taken by over 100,000 people worldwide on Cognitive Class (a volunteer initiative for which I’m the marketing manager), Coursera, and edX.
This is not to brag (like many of us, I tend to feel underaccomplished at times), but rather to say there is a method to my madness and that my approach appears to have helped a lot of people. I’m hoping that it will help you as well.
“How to become a Web Developer” doesn’t mean that I will teach you how to program in HTML, CSS, JavaScript, etc. I could do that, but this svelte guide would become a 1,200-page tome in no time flat. And it would likely be one that would echo a lot of resources that are already available elsewhere.
Instead, I’m going to tell you what to study, along with how and why to study it. I will also point out various useful books and resources where you can learn more about the technical topics I mention.
I’ll give you the roadmap, but I won’t be doing the actual studying for you. 🙂
This is all very doable though, fear not. There are millions of developers, most of who are not any more special than you are. However, it would be a lie to say that there won’t be a lot of work involved on your part.
It will be, but if you’re not afraid of some elbow grease, a better career (and possibly life) awaits you on the other side of that dedicated effort.
Instead of elaborate arguments trying to sell you on the profession, I’m going to list a few quick, bullet points in favor of becoming a Web Developer in the 2020s.
Those are some of the major perks but, as you’ll find out if you go through this process, the work itself can definitely be its own reward as well.
Of course, your landlord expects dollars not your sense of accomplishment and self-satisfaction. But thankfully, web development covers you there as well.
This first article in our series is primarily an introduction to what is to come in future entries.
Here are some of the topics that I’ll cover next:
For now, remember that you can do this. Together we can get you in shipshape for your future web development job.
And please don’t forget to subscribe below to ensure you receive the next installments of this guide.
The post How to Become a Web Developer and Get a Job With No Experience (Guide) appeared first on Programming Zen.
]]>The post Removing Duplicates From a List in Elixir appeared first on Programming Zen.
]]>Enum
module, in Elixir we can trivially remove duplicates from a list.
In the following example, we take a list of integers and pass it to the Enum.uniq/1
function which removes duplicates from the list without altering the original order of the remaining elements.
list = [1, 2, 2, 3, 3, 1, 2, 4]
Enum.uniq(list) # Returns [1, 2, 3, 4]
If you are trying to only remove consecutive duplicate elements, then there is Enum.dedup/1
:
list = [1, 2, 2, 3, 3, 1, 2, 4]
Enum.dedup(list) # Returns [1, 2, 3, 1, 2, 4]
(Note: We append /1
simply as a notation indicating the arity of a function, that is how many arguments it accepts. my_func/1
accepts one argument, my_func/2
two, and so on.)
Enum is full of helpful functions when working with collection data types that implement the Enumerable
protocol (e.g., lists, maps, ranges, streams, etc.) and it’s worth getting acquainted with.
Alright, Elixir does the heavy lifting for us in this case, but how would we go about removing duplicates from a list in Elixir without using Enum.uniq/1
? I mean from scratch, simply using recursion without relying on Enum
, sets, :lists.usort/1
, etc.
It is worth asking such a question to both exercise our recursion muscle (something that doesn’t come naturally to most programmers) and so that we’re ready to handle conceptually similar problems that do not have pre-made functions but could benefit from a recursive solution.
There are likely a few ways to implement this, but this what sprang to mind when I thought about it:
defmodule MyList do
def uniq([]), do: []
def uniq([head | tail]) do
[head | for(x <- uniq(tail), x != head, do: x)]
end
end
Calling MyList.uniq(list)
will then return the same list without duplicates as Enum.uniq(list)
did. (Although, it’s worth noting, that we implemented a List
-specific version of the uniq/1
function).
Let’s see how this works. If the list is empty (i.e., []
) we obviously return an empty list, as there is nothing to remove. This is our base case for the recursion.
If the list is not empty, it will have a head and a tail, and we use Elixir’s pattern matching to bind the first element of the list passed to the function to head
and the rest of the elements to the list tail
.
Note that a proper list with a single element will simply have an empty list as its tail. So writing [3]
is equivalent to writing [3|[]]
where 3
is the head, []
is the tail, and |
is the cons operator (short for constructor operator, as it’s used to construct lists).
So far so good. Here is where things get a little trickier. Let’s analyze this line:
[head | for(x <- uniq(tail), x != head, do: x)]
The code is wrapped in square brackets [...]
which means that we are returning a list. Then you’ll notice the |
cons operator. So we are constructing a list that has head
as its first element and whatever the rest of that line of code does, as its tail.
This makes sense if you think about it. Sure, the list might have duplicates, but the first element will always be included. If a duplicate of the first element exists, that’s the one that is going to be removed and not the first element.
So we are building a list and the first element of the original list is also the first element of our deduplicated list. What goes into the rest of the list?
We see a for
. Unlike many programming languages, for
is not a loop keyword in Elixir. Rather, it is used for comprehensions (a form of syntax sugar to generate lists from existing collections). Syntax, which is not too different from mathematical notation.
Here is a simple example of how to use them:
for x <- [1, 2, 3, 4], do: x + x # Returns [2, 4, 6, 8]
“For each element x
in [1, 2, 3, 4]
do x + x
and put the result in a list.”
It also accepts filters, which allows us to specify a condition:
for x <- [1, 2, 3, 4], x < 3, do: x + x # Returns [2, 4]
In this example, the condition is that x
is smaller than 3
, so only the first two elements, which are lesser than 3
, get doubled and added to the resulting list.
OK, back to our “cryptic” line:
[head | for(x <- uniq(tail), x != head, do: x)]
head
is our first element and then we are using a comprehension to generate a list without duplicates.
We are saying, for each x
in a deduplicated tail
, add x
to the list if it’s different from our first element head
.
The part that gets people weirded out about is recursively calling uniq(tail)
. We can get away with this because we have a base case that ensures we don’t recurse forever.
At each call of uniq(tail)
we are making the tail shorter by one element.
For example, executing MyList.uniq([1, 2, 3, 3])
will make the following recursive calls:
MyList.uniq([1, 2, 3, 3])
MyList.uniq([2, 3, 3])
MyList.uniq([3, 3])
MyList.uniq([3])
MyList.uniq([])
When we eventually get to the tail being []
, which is our base case,[]
is returned and MyList.uniq/1
is no longer called.
Recursion can be hard to grasp at first, but it’s a powerful tool and a staple of functional programming, so it’s well worth practicing.
As pointed out in the comment section, this implementation is quite illustrative but not very efficient. In production, you’d want to opt for the built-in functions or implement a tail-recursive version that leverages MapSet
. And although tail recursion is faster in this case, it’s worth noting that even that is not a silver bullet.
The post Removing Duplicates From a List in Elixir appeared first on Programming Zen.
]]>The post Specify a Port when Booting a Phoenix Application appeared first on Programming Zen.
]]>mix phx.server
. This will start Cowboy in development mode, which by default accepts connections on port 4000
. But how do you specify a different port? In Phoenix, there is no -P
or -p
option.
You’ll need to edit your config/dev.exs
configuration file to change the host
key as follows:
http: [port: System.get_env("PORT", "4000")],
System.get_env("PORT", "4000")
retrieves the value of the PORT
environment variable if one has been set. If the environment doesn’t have the specified variable (i.e., PORT
), it will default to 4000
.
You can then boot your Phoenix server by passing the variable value to the command as follows:
$ PORT=5000 mix phx.server
This will run the server on the port you specified, in this example 5000
.
The name of the environment variable is arbitrary. We used PORT
but we could have opted for PHX_PORT
or something else altogether. Just so long as your configuration file and environment use the same name.
You can, of course, set the environment variable outside of the mix phx.server
command, for example in your shell profile.
The post Specify a Port when Booting a Phoenix Application appeared first on Programming Zen.
]]>