I know the basics of JavaScript from my college days (which feel pretty hazy now), but I’ve mostly used it to tweak my WordPress portfolio sites and mess around with my Blogger blog. I never really did anything too complicated with it.
JavaScript syntax can be complicated. JavaScript has a lot of quirks that make it tricky to master. The addition of concepts like callbacks, promises, and async/await can make it feel like you’re juggling multiple balls in the air.
I consider C a complicated one too but I still think, it is even more straightforward once you understand its structure. With JavaScript, there are subtle differences in how you handle functions, objects, and variables. C's syntax feels more predictable and consistent. Once you get the hang of pointers, memory management, and the general structure of the language, it becomes more manageable. But JavaScript? The constant changes and updates to the language, along with its sometimes unconventional practices, it can be a bit confusing.
Maybe, I haven't been really using much of JavaScript that's why all these seem so daunting. I’ve got more serious experience with C, having built several systems during college and then using it for payroll and record systems for a few years. The syntax was complex, but it was something I could handle back then.
And comparing Javascript to Python and R, advance Javascript looks a combination of Greek and Latin. Their straightforward syntaxes makes learning a breeze.
But, the thing is JavaScript always comes into play with R and Python. I recently worked with interactive R visualizations and had to use some medium Javascript coding. So, even though I’m struggling, I’m pushing myself to go beyond the basics. How? Besides free online courses and practicing code, I’ve been using GitHub Copilot. It offers suggestions on how to improve my JavaScript, which has been a lifesaver.
With the interactive visualization, I was mapping city locations for Presidential candidates and Presidents. There were times when I was furiously staring at the screen, unable to find what was wrong. Copilot found the issues (curly braces missing and a misspelled function name) in seconds when I couldn’t find anything online.
I also recently faced a tougher challenge. I had to clean a big, messy dataset. My team leader suggested using App Script, but I was hesitant since I was more comfortable with R. But, the problem is my laptop broke down, leaving me with an older, slower one. So, as I can't use BigQuery and R Cloud for collaborative data cleaning (which requires huge RAM usage), I used Google Sheets. Aggregating all the data I need into one single Google Sheet with Appscript took time but it wasn't that complicated. But, the struggle began in the cleaning process. Javascript numerous curly braces were a bit tricky for me. Giving up because of Javascript curly braces! So, I sent a message that I was doing the data cleaning with R as it would make everything more efficient.
The message ended up with a Skype call from my team leader.
I explained what needs to be done. He insisted on using App Script for some of the cleaning. I resisted at first. I wasn’t confident using AI-assisted code, fearing it might affect accuracy. But after a demonstration and tweaks here and there, I got it to work. Even though AI-generated code can be helpful, I believe understanding the code is crucial. Blindly pasting it can lead to issues and potential data damage.
In the end, I still did the more advanced cleaning with R, reusing previous project codes, and finished in just 5 hours. My takeaway? AI can help, but code efficiency still relies on us.
Basic knowledge is essential to avoid blindly using AI-generated code, which could harm datasets.
So, okay, I am not giving up on Javascript. I'm going to advance it bit by bit, despite its challenging syntax, especially the curly braces!
No comments:
Post a Comment