August 21, 2019 . 11 min read
react
front-end
e-learning
A couple of months back I have decided to learn how to code and it has been a journey sprinkled with amazing moments, but full with hard brick walls encounters, doubts and uncertainty. Learning something new takes a lot of time, being patient and, some would say, a little bit of obsession. That new thing is, by nature and virtue, something that you are not familiar with.
To be more precise according to my GitHub repo I started in Dec. 2019! That was when I have entered my first
git push
I have made some progress since December but I am still a rookie with regards to coding. Back then, given that I was completely new to the topic, I had no idea where to start. There are so many online resources that it is difficult to choose.
With this post, I hope to be able to help folks that are in the same situation that I was. Bear in mind, this is a journey and it will not be an overnight success. If anything, and I am not trying to discourage anyone, you will be burning the midnight oil for a couple of months till you start to get the hang of it.
Make no assumptions, independent of the technologies that you aspire to learn, you will need to put a lot of hours into it. I reckon that learning to code is similar to learning a new language, you can know all the theory, but if you don't really practice it, you will loose it.
Simply put, I wanted to be able to build stuff. To be autonomous. To create with my own hands, using tools that are out there and are, or rather should be, easy to work with. Going from a concept, through designing and building was something that I was fascinated with.
For a couple of years I have been drawn into this topic: How does one becomes a developer? or probably better and simpler, How does one learn how to code?.
For me one thing was clear - I wanted to see things being built. That was why I started with front-end development. As I mentioned before I was eager to see things being built and done.
As I write this, I receive 2 very interesting newsletters from freecodecamp news. The first one entitled beginners roadmap to web development and the second one with the more ambitious title 650 free online programming computer science courses you can start this summer. Both are great posts that highlight the numerous sources of code and resources that one can tap into. On the other hand it could be overwhelming to anyone that is starting on this journey.
Despite all of the noise, if you really want to learn how to code, you need to choose between front-end or back-end. That will change the resources that you will be tapping into to learn faster.
For me, as I mentioned, front-end was the way to go, but it is impossible to shy away from back-end development as you will need at one point to store your data somewhere.
Anyone starting with front-end development should have a good grasp of:
So, where to start? There is no right or wrong here and I probably didn't take the easiest path into learning front-end as I started with the Codecademy react online course, but hey... it was a great experience.
Here are my go to resources for online courses:
Other recourses that I couldn't live without:
It is all about trying new things and experimenting with the tech
Throughout this learning journey I have done a lot of projects and invested time trying to better understand the react ecosystem. Everything that I have been doing is with ReactJS
.
A web App that search for restaurants in a certain any city you would like to 🍲
Details | Links |
---|---|
Code Base | burguerBuilder |
Platform | udemy |
Whilst I wonder through the code base and reflect on this project, a couple of things came to mind. For me, there where 3 main leanings:
state
of the app by defining the state
and by using eventHandlers to setState
in a immutable way.//defining the statethis.state = { term: '', location: '', sortBy:'best_match' , };//Get the term and the location out of the inputshandleTermChange (event) { this.setState({term: event.target.value}); }handleLocationChange (event) { this.setState({ location: event.target.value }); }//this is in the render of my component<input placeholder="Search Businesses" onChange={this.handleTermChange}/><input placeholder="Where?" onChange={this.handleLocationChange}/>
utils.js
on my git repo.Business.js
component and mapping the data points from yelp! api into a new component BusinessList.js
that would render them as follows:<div className="BusinessList"> {this.props.businesses.map(business => ( <Business key={business.id} business={business} /> ))}</div>
Creating a Spotify playlist 🎧 selector
Details | Links |
---|---|
Code Base | Jamming |
Platform | Codecademy |
At that time this was, without a doubt, my most challenging project. I clearly remember the struggle, the ups and downs the numerous slack debates with the group of people that I was learning with... ahhh it was grueling, it did test my nerves, but it is important not to give up and keep pushing.
At the end of the project I did learn a lot:
accessToken
and get the userId
. After validating the user one would need to be able to search for the music, artists or albums so that they would be render in a list. After that you would need to save it or not to the Spotify account. If you are keen to learn more just head to my code base and search for the spotify.js
file under utils
folder;//in the App.js file you will find the App statethis.state = { searchResults: [], playListName: "Top List", playListTracks: [], popUpShow: false, }// that we will change depending on the actions on the UI//To add...addTrack(track) { let tempPlaylist = this.state.playListTracks; if (this.state.playListTracks.find(savedTrack => savedTrack.id === track.id)) { return; } else { tempPlaylist.push(track); this.setState({ playListTracks: tempPlaylist }) } }//...and to deleteremoveTrack(track) { const tempPlaylist = this.state.playListTracks; const newPlaylist = tempPlaylist.filter(removeTrack => removeTrack.id !== track.id); this.setState({ playListTracks: newPlaylist }); }
+
for -
and keep everything on the track.js
component in the same way when you change that track from "Search Results" to "Top List".// this is the method used in `track.js` componentrenderAction() { if (this.props.isRemoval) return (<a className="Track-action" onClick={this.removeTrack}>-</a>); else return (<a className="Track-action" onClick={this.addTrack} >+</a>); }//note that isRemoval prop is `false` for the trackList component in the SearchResults abd `true` in the PlayList component
This was my first personal project. A web app to track the food intake of your baby 🥜
Details | Links |
---|---|
Code Base | BabyPeanut |
Yup, I know a very clunky design. But hey, it works and it was a good experiment. And let me tell you, doing something yourself instead of simply following an online course is completely different. You really need to think how to solve for different problems. So, what have I learnt with this mini-project:
semantic-ui-react
, for a UI calendar that gels well with semantic I have used semantic-ui-calendar-react
and to style components I have used styled-components
. And probably I used more than those, but for me the interesting thing was the fact that I was building something on top of someone's work. Let's look at some examples//Calendar exampleimport { DateTimeInput } from 'semantic-ui-calendar-react';<DateTimeInput ... name='datetime' maxDate={new Date()} marked={new Date()} markColor="orange" .../>//Let's say you just want a component that is a FlexBoximport styled from "styled-components";const FlexBox = styled.div` display: flex; flex-direction: column; padding: 15px;`;//...return ( <Flexbox> {children} </Flexbox>)//...
/* ********************************** Grid Styling ***********************************/.field-container1 { display: grid; grid-template-columns: 25px 1fr 1fr; grid-template-rows: 40px 75px auto; grid-gap: 10px; grid-template-areas: " icon1 field1 field2 " " icon text text" " . button .";}/* ********************************** Grid Responsive ***********************************/@media screen and (max-width: 580px) { .field-container1 { display: grid; grid-template-columns: auto; grid-template-rows: auto 40px 60px auto 75px auto; grid-template-areas: "icon1" "field1" "field2" "icon" "text" "button"; }}
For the most experience developers those things could seem super simple, and I probably would agree that they are, but for me, at that time, that was an amazing achievement.
A Web app where a user builds and purchases a Burger. A udemy project that I haven't finished 😥, so I def will need to get back at it as soon as possible!
Details | Links |
---|---|
Code Base | burguerBuilder |
Platform | udemy |
Damm, now that I am checking my Repo, it has been 5 months that I created this project. It goes to show that learning to code takes a lot of time and patience as I have yet to finish this!
To be completely honest, I feel that I need to do a proper post with just this project. End to end, explaining what I have learnt here as this was definitely the most complete project that I have tried to do and build. From an UI perspective I have learnt how to build and sideDrawer for my menu, have used Redux to manage state, learnt how to connect my web app to a database and manged to create an authentication functionality that enables any user to check their past orders.
Now I just need to find the time to (1) finalize the course and (2) summarize my learnings so that I reflect on them.
As I reflect on what I have learn till now, I realize how much I don't know and how much I still need to learn. For me the ultimate goal is to create, at least, 1 project, 1 PWA that will help people with whatever they are trying to do in a relevant way. It could be at work, with my "pet" project or something to do with BabyPenaut Web App or even better, something to do with surfing 🏄!
Having said that, I will be focusing on building up this blog, making a couple of changes to it as well as building up my skill set in a way that will enable be to build and ship a web app that is ready to use in the real world. At the moment I don't feel I am ready for it.
Till then, see you around!
1 minutes read
1 minutes read
3 minutes read
4 minutes read
3 minutes read
2 minutes read
No spam! Only good stuff!