Text
Ruby Almighty

Ruby is one of the most popular programming languages in the world. It was introduced in 1995 but didn't achieve today's popularity until around 2005. Its fame rose to the top mostly due to the introduction of Ruby on Rails. Ruby on Rails was considered as the best language to learn, the language with the highest potential, easy to use and among other praises for many years. However, in order to deploy Rails on your projects, one has to learn Ruby first. After all Rails is just a framework that depends on the almighty Ruby to work and achieve the fame it has enjoyed to this day.

Ruby was introduced in 1995 by its creator Yukihiro Matsumoto. The man must be a genius because he had deep understanding of multiple programming languages including Perl, Smalltalk, Eiffel, Ada and Lisp. In addition to understanding, he was about to extract the best parts of each language and combined them into what later to be known as Ruby. According to Matusmoto himself, most programming languages are not easy to work with. He created Ruby because he wanted developers to be able to enjoy the process of programming. In order to do so, a programming language that is easy to use and enjoy is necessary. However, such language did not exists at the time, so Matsumoto decided to take the matter into his own hands and Ruby was born.
Is Ruby so popular just beacuse it's easy to use? Not so. In addition to it being developers friendly, it is also very powerful. Not only it's powerful, it is also platforms friendly. Ruby can run on Linux, Mac OSX, Windows, UNIX, DOS, BeOS, OS/2 and more.

One of its most popular use is web development with Rails. Even a small team of start up can create fully functional sites comparable to those of giant corporations. Popular sites that used Ruby on Rails for their web developments include Github, Shopify, Kickstarter, Twitch, Instacart, Zedesk, SoundCloud, Hulu and Square. Ruby can also be used for static site generation. Github's founder created a static site generator named Jekyll, and it is written in Ruby. Jekyll is the default way for Github to publish contents. DevOps and automation is another popular use of Ruby. One of the most popular DevOps tools site Heroku originally only supported Ruby. In addition Ruby can also be used to build web servers, processing data, scraping and crawling the web.

In conclusion, Yukihiro Matsumoto has gifted humanity a great programming language. It is not only easy to use, it's also extremely powerful and flexible. It can be used to create front-end and back-end contents with the help of Rails. If Ruby were a person, then it might just be omnipotent.

0 notes
Text
React: Components as a Modular Solution

In Phase 1 of Flatiron School we focused on learning vanilla JavaScript. The amount of variables and functions seemed a bit of chaotic when looking at the code as a whole. I kept asking myself how messy it would be to code a whole suite of applications like Microsoft Office? In Phase 2 I learned that the solutions to that concern have existed for a while, and we are going to learn one of them: React.
One of the most notable features of React is the "components". Every function can be an individual component as a separate file. A suite of applications can now be viewed as various components instead of a long messy collection of codes. Every component is responsible for one purpose, and that makes the job of developers a lot easier. This is the benefit of coding in components, also known as modular code.
Modular code offers many advantages over the tranditional vanilla coding in one file. It has a strict variable scope, so that you don't have to worry about a variable polluting the code in other components. Since each component is responsible for a specific function, they become easier to navigate, read and to debug. The developers are more likely to produce more efficient code and deliver higher quality product in the end.
The benefits of modular code makes React a much more exciting lesson than the vanilla JavaScript.
0 notes
Text
When the Mind Goes Blank (My Strategy on Tackling Code Challenges)
I have been a software engineering student at Flatiron School for a couple of weeks now. After reading the articles and listening to the lectures, I felt like I knew everything. However, each time I am assigned a project, my mind goes blank as soon as I finished reading the instruction. I had no idea what to do, I didn't know where and how to begin. Even though the projects(lecture activities, labs, mock code challenges) are well within the scope of lessons that I thought I have completely absorbed; I felt like I knew absolutely nothing at the most critical moments.
It took me a few failures at the code challenges before I realized why my mind goes blank in those moments. I knew the material and individual codes, but I didn't have plan on how to use them. It's like knowing how to stack a brick on top of another. Without a blueprint, stacking bricks alone cannot build a structurally sound building. I realized that I needed a blueprint to guide me, for the moments when my mind goes blank.
There are three parts to a code challenge when my mind can potentially go blank. First part is retrieving the data from a source. The source may be an API, a remote server or a local virtual server. Without the data from a separate source, nothing else can be done in a code challenge. Because the rest of the code challenge is all about manipulating and interacting with the data retrieved from a source.
The third part of a code challenge is usually adding event listeners to make certain elements in the DOM to be interactive and respond to actions. This may sound tough but as long as you can tackle the second part, which is the middle of the code challenge, then you should do just fine. (Did you think I forgot about the second part? No, I left it for the end on purpose)
The second part of a code challenge usually involves taking the data from the first part and manipulate them according to the instructions; aka DOM Manipulation. Most of the time my mind goes blank in this part, probably because there are so many techniques and codes that can be used for this part and my mind just feels lost about where and how to begin. This is where a blueprint is needed the most.
While coming up with a blueprint I came up with an acronym to help. I call it GAPA: Grab, Anchor, Point & Attach. The code challenge usually wants something done to the data retrieved from the first part. For example, place a picture at a certain spot, or print a sentence at a particular location. When my mind goes blank at this moment, I'll use GAPA to start manipulating the data.
1. Grab. First step in any DOM Manipulation is to locate where the instruction specifies. If the instruction wants me to place a picture under a certain tag, then I first need to GRAB it. I can grab it with document.getElementById() or document.querySelector(), and add an "id" or "class" to the tag if it doesn't already have one.
2. Anchor. Once we have grabbed a location, we need to create an anchor if it doesn't exist already. I usually do it with document.createElement(). Sometimes the HTML already has an anchor created so this step can be skipped.
3. Point. Now that we have a location and anchor point, what do we put in there? It could be a photo or a string, and we need to "point" to the source. For example, if the task is to attach a photo, then we can point the anchor we just created to a source like: anchorImg.src = data.image.
4. Attach. Now that we grabbed the location, created an anchor and pointed to the source, the last step is to attach them. Because at this point we have created a few things but never actually attached them to the DOM; they are still invisible to the naked eyes. As we have identified from the instruction, an image needs to be placed under a tag we grabbed in step one. We can accomplish this with .append, .appendChild or .replaceChildren depending on the situation. It would look like this: location.appendChild(anchorImg).
Conclusion. By following the GAPA method the second part of a code challenge should become clear to the mind, and helps to pave the road to third part as well. It's not a cheat or secret but it's a blueprint that helps with my thought process 100% of the time. To summarize: 1. Grab: usually with .getElementById()/.getElementByClassName or a Query Selector. 2. Anchor: usually with .createElement() or skipped completely. 3. Point: usually with .src for images or .textContent/innerHTML for strings. 4. Attach: usually with .append()/.appendChild() or .replaceChildren().
#education#learning#coding#computer science#software engineering#developer#javascript#flatiron school#code challenge
0 notes
Text
Elements of a positive and productive learning environment.
It has been a full two weeks since I have started a full time Software Engineering program with the Flatiron School. It’s been rough. I was expecting a high intensity of learning and Flatiron did not fail to meet that expectation. The top gear intensity from this program reminded me that there are more to learning than just attend the classes and study the material. Creating a positive and productive environment is also a major key to succeed in any academic field.
I love learning. Maybe a bit too much. I have attempted two undergraduate degrees and taken over 300 credits worth of courses. In my first degree I majored in Earth & Space Sciences and minored in Biology and Philosophy. What did I do with them after graduation? Absolutely nothing. I simply liked learning about various things whether they eventually provide a monetary reward(it’s both a good and bad thing). The second degree I pursued was Nursing. I did not complete the nursing program but I did learn a lot of healthcare related knowledge; after all I was only one course away from graduation.
Throughout my journey of learning, I have experienced semesters where I failed every single course and also semesters where I earned 4.0 on every subject. I am not bold enough to claim I know the secrets to ace every class. However, I am confident that I have learned enough to show you how to create a positive and productive learning environment for any kind of study.
1. Health Management (Physical/Mental/Spiritual)
It is a well known medical fact that your mental conditions can affect your physical health, and the opposite is also true. Therefore, both mental and physical health are equally important. For some people spiritual health is also a part of the overall health management.
Making sure you are eating right, getting enough sleep and exercise are just the basics of managing your health. Hydration and the length of sitting are often neglected; make sure you drink plenty of water and get out of the chair to move around every once in a while.
Taking a good care of yourself is key to success in learning. If you aren’t feeling well all the time then your brain’s learning capacity will be reduced.
2. Time Management
I’m sure the term “time management” has been said and heard over and over. It is an element to learning proven time and time again. However, it may not be as easy as it sound and is sometimes interrupted by forces beyond your own control.
For example, in some cultures the family’s older members’ needs are much more important than the younger members no matter how trivial they may be. They may not care how important your projects/studies are and torment you until you have safisfied their needs. I don’t have the solutions for all potential interferences to your studies. However, I try to anticipate such interruptions and try to allocate some time for such purpose in the worst case scenario.
3. Invest in Yourself
Investment is important. Everyone enrolled in the Flatiron School probably already knows this by heart.
In addition to investment in education/learning, there are also investments to make the learning experience much more pleasant. For example, if your chair is not comfortable, invest in a better chair. If you aren’t comfortable when you’re learning, you won’t be able to do your best. Especially when you are expected to be sitting for 15 weeks in a full time program in Flatiron School. Standing desk is also a great investment!
During my first two weeks of software engineering program, my PC caused me a bunch of headaches. Even though I just recently built this PC with the latest high end parts, it still gave me unexpected issues due to the inferiority of Windows environment. This has negatively affected my learning. I have since then invested in a new computer from Apple(Mac Mini M1) which is well known for better stability and superior experience in coding.
Conclusion
Creating a positive learning environment for yourself leads to a productive environment. Always ask yourself if there is something else you can do to make improvement, as long as it’s within your means(monetary or otherwise). Are you able to read the codes properly? If not, then maybe you need a larger monitor. Are you comfortable in your chair? If not, then may be an ergonomic chair is needed. Whatever doesn’t make you feel comfortable should be addressed as early as possible, so that you can begin your journey of learning with a positive start.
1 note
·
View note