A Day In the Life-My Journey So Far

It’s been quite awhile since my last post. I have been trying to keep busy with my life, figuring out how the job markets work here in California, while maintaining my skills. My favorite programming thus far is Javascript and I strive to improve further on my JS skills in order to be a more efficient developer.
Throughout these past few months it has been increasingly difficult when it comes to job hunting. I have sent out countless applications and only a few companies have gotten back to me. I’ve been rejected numerous times, ghosted a few times— it’s been quite a cycle for me that I’m unfortunately used to. I have learned to get further in the pre screening process and being able to land a couple of technical interviews.
I recently was set up for an interview with this company I really resonated with. The first interview was a bit casual with some coding questions which I completed with Javascript. The second was with VP of Software Engineering department and it was a repeat of behavioral questions and technical questions. I did great on the two interviews that I was pushed to the last round for an interview with VP of company. I have been told that there were about 4 other candidates. No biggie, I made sure not to feel too confident and comfortable. I went and bought more professional clothes to prepare myself for the big day.
The interviewer was intimidating, but friendly. I felt strong, authoritative vibes from her. I think perhaps she felt I may have been a bit nervous but oh well. Once again she asked me questions such as: Why do you want to work for us? What have you heard about us? What’s up with the year gaps from your college years up til no? Favorite tech stack? What do you see yourself in five years? That kind of stuff. It was an interview of mostly cultural fit questions and to see if I could get along with everyone. If I’m a like able person.
In the end, I didn’t get the job. Where did I go wrong? What did I say that was wrong? Was it my body language? Were my words not chosen carefully? Did they just prefer the other candidate over me because they did much better on the white board coding test? I don’t know. I didn’t hear any response when I asked where my shortcomings were through email.

Back to the drawing board. It was a great learning experience nonetheless. I’ve applied to so many places but it’s real tough out here in California when you’re going against graduates, Bootcamp graduates and other self taught developers. I’m trying my best to stick out like a sore thumb. It’s been quite a journey and I’m enjoying the experience so far, no matter how discouraging times may be right now.

Advertisements

Overlooking mistakes pt.2

It really is true what they say when they tell you the majority of your time is debugging code and making it work, what ever it takes. Upon attempting to connect my front-end app to Heroku, I once again ran into a couple of problems. For one, when I tried to add my remote github link to my git remote branch, it wouldn’t work unless I had to clarify it again twice by copy pasting from my actual site. Another one that took me awhile was the fact that I couldn’t deploy my app to Heroku AT ALL. I kept getting the error “heroku pre receive hook declined” and so I had to Heroku log everythinggg to see what was up. I eventually had to get into my logs on my Heroku server and saw that maybe the solution was updating my node and adding the Heroku/node buildpack. And that is what I did.

This time I thoroughly remembered to git push all of my saved files. 2 hours later, deployment successful~ Lesson of the day: trust your logs. Every. Time.

Last but not least was the CORS problem. Knowing that my app is actually LIVE, I can’t just run CORS every time on a separate desktop because…well…that’s all local stuff. And doing that on a browser can lead to hackers invading your privacy and information.

It was an easy fix of adding app.use(cors()) along with:

app.use(function(req, res, next) {
res.header(“Access-Control-Allow-Origin”, “*”);
res.header(“Access-Control-Allow-Headers”, “Origin, X-Requested-With, Content-Type, Accept”);
next();
});

Also installing cors once again to make sure and keep it updated helped.

Overlooking mistakes and logs.

I have been debugging for about 6 hours and was so close to tossing my laptop out of the window. I was following up with the course and eventually hit yet another obstacle: successfully deploying my site on Heroku for the first time. Code was running smoothly, database was successfully in motion, what could go wrong? Well, it looks like I was experiencing a 503 internal server error, as well as a CORS error. 503 internal error meant that my back-end was not connecting to the front end or database at all, and no HTTP requests were successful. CORS error meant a cross-platform domain issue…something I have yet to look into. But I did install CORS package and enabled it within my app, which means I am able to access it on any platform just fine. What happened there?

I’ve been doing heroku logs –tail to trace my logs and see what I can debug. I’ve gotten ALL kinds of HTTP errors. Obviously. Then I made sure to disable CORS by running chrome.exe and disabling it through there. Still didn’t work because 503 server error was still there. What?

 

Fast forward 6 hours later.

I was still scrolling through Stack Overflow, FCC forums, Quora…even asked on Discord to see what’s up. As I was scrolling, I remembered….

“When was the last time I committed a file to my master branch…?”

Well, crap. It’s been awhile since I git pushed recent files.

Lo’ and behold…Server is running smoothly. I am able to create a new user and log in successfully in my app. One little slip up and neglecting to remember to push files onto master branch can really mess you up in the end and make you want to pull your hair out.

My partner was trying to reassure me, telling me that I am more than capable of doing freelancing jobs on the side while looking for an actual job as a full-time developer.

I told him that if I can’t even do something as simple as debug code or even run my app on a server, I am not ready at all.

Ouch. I’m not ready. Far from it.

Back-End nightmare…

Long time no blog post. It’s been awhile. For the past 3-4 months, I’ve been taking The Ultimate Web Developer course by Andre Neagoie. His lectures are on-point and dense, in a good way. I am usually coding with him and would pause in between sessions just to take a good look at code or mull over what I just typed. I have high expectations on this course thus far and so far, so good.

Eventually, I reached a breaking point and a huge obstacle.

Back-end development.

Back-end is a totally different monster. I eventually got to the end of the back-end: database chapter but reached a huge obstacle. Everything was great up until this point. For some odd reason, Postman could not do HTTP requests–however, server was up and running smoothly. Code looked fine. I backtracked a few previous videos to see what I missed. I made sure to catch any internal errors in my server and console.log it in my terminal.

What is going on?

Port is running smoothly. No error in code. Hm. It MUST be an error on MY part. It MUST be the server. But exactly what? I created a database, created a password for authentication, made sure the database is running. However, I was not able to register the user on my app and Postman isn’t able to do HTTP requests…hm. This is my fault.

I went on Zero to Mastery’s discord server to ask for advice. Eventually I learned that pg is running on a different server altogether, with a default port: 5432. THIS I didn’t know! I was never aware of the fact that pg runs on something entirely different. I was negligent of the fact that I had to specify it in my db knex object:

 

aha.png

Literally such a small thing such as specifying port # for something I did not need, threw EVERYTHING off. This shows how much I need to learn about back-end development. A lot.

I had to log this one for the books. I just had to. I’ve been stuck on this for about a week, so much as it was hindering me from my studies. Just being stuck on something for awhile was holding me back. Whew. What an “aha” moment! Kind of. I’m relieved I can continue and press on.

Asynchronous vs. Synchronous

Asynchronous programming consists of when a unit of work runs separately from ts main application thread and notifies the calling thread to its completion, failure or success. JavaScript is a great example of an asynchronous programming language. It can work line by line like how synchronous programming works, but also can be asynchronous in many ways.

Here’s how:

setTimeout(function(){
  console.log('Hey, why am I last?');
}, 0);

function sayHi(){
  console.log('Hello');
}

function sayBye(){
  console.log('Goodbye');
}
sayHi();
sayBye()

 

  1.  JS will parse the entire script as well as search for syntax errors
  2. it sees a setTimeOut function and adds it to the top of the stack
  3. It will get sent to the Web API container and gets popped off the stack
  4. Timer is set to 0 seconds, therefore, Web API queue sends it to Callback Queue.
  5. event loop will check to see it’s empty. it’s not because there are two functions
  6. function sayHi() will execute, it will console.log ‘Hello’
  7. console.log ‘Hello’ will get popped off the call stack
  8. function sayBye() will execute, adding console.log ‘Goodbye to top of stack
  9. That also executes and gets popped off the stack
  10. anonymous function also gets popped off the stack after getting executed.

OC Hacktoberfest;

Last Thursday, I attended my very first tech event celebrating Hacktoberfest 2018. This is my first year attending Hacktoberfest and contributing to open source(which I have yet to make another post about), so I was excited about sharing my latest projects with other people.

The event was held in Irvine, California at AutoGravity headquarters. AutoGravity is an auto-financing company that helps their clients finance cars and connects them directly with dealers/lenders. They also host other Hackathon events every other month or so.

Upon entering the site, I signed in with my information and signed an NDA. There were a few things I could not take pictures of at the event, including the design of this year’s Hacktoberfest shirts and their slideshows, of course. So I just decided not to take pictures at all. Anyway, there were a bunch of people who arrived early and just chit-chatted with each other. It seems that people came with their own groups and just kept to themselves…but little friendly, ol’ me walked up to almost everyone and introduced myself 🙂

The event started around 7pm and we were free to grab some food(yum, kabab! and baklava!) and drinks(Kombucha isn’t entirely cheap…but it was free for us attendees O.O). 10 minutes after settling in, the front-end devs of AutoGravity introduced themselves and started the slideshow. The slideshow pretty much wrapped up what Hacktoberfest is, contributing to open-source, and of course what tonight’s Hackathon entails. There were a few contests going on such as the first person who did the first pull request of the night gets a free Amazon giftcard, and there were others but I can’t remember them at all. They didn’t leave that part of the slideshow on during that time so no one really remembered what the contests were on–just that their goal was to complete the five PRs for this month(Aaand I couldn’t take a picture of the contest information either so…).

What I found pretty cool was that they introduced a workshop for those who have never done their first pull request on Github. This Github workshop helped attendees on creating an account on Github(if they have not done so already) and showed them the steps on creating their first PR. I pushed my boyfriend to attend that workshop with my laptop since he did not bring his. I stayed for a good few minutes to see how it was, then decided to head back and talk with other people. I met a couple of other front-end developers for AutoGravity and talked a bit with Jesse, who was the front-end manager. He gave me some advice on pushing forward with my projects and told me to keep learning no matter how frustrating it can be at times. I also met a couple of people attending Redwood Code Academy, which is a coding bootcamp located in Santa Ana and they all told me they are “coded out”(lol) and are on week 10 of their learning curriculum.

It was a great time talking to people and having a great experience overall at the event that night. I got to meet people with different kinds of learning experience–people who just jumped into learning to code for the first time this year and people who have been at it for years. AutoGravity is hosting an event based on Javascript some time next month so for sure, I am attending that as well.

All the APIs

Some insightful links on learning on API’s:

 

The last link, if anything, confused me more than leaving me with more knowledge on APIs. Given, it was a little early on for me to start learning on the concept of this subject, but other sites were more insightful than the previous. The instructions became more difficult to manage, jumped from one end to another, and left me with more questions than answers.