From jQuery to JavaScript Without Tears

Un-possible?

Looking for a cute set of progress bars for my app, I searched around and found a great blog post with a few examples. Originally I had zero intention of using animated progress bars, but they seemed to fit well enough for my needs and actually added a bit of, dare I say, pizazz, to the page.

So I go to play around with the code… aaand it’s jQuery.

facepalm, the other Picard maneuver

On a positive note, usually I can tell what’s going on in jQuery, as if reading psuedocode. It feels sort of like guessing what a Spanish billboard says as an English speaker (to me, anyway). I suppose the faster way to move forward with my project would have been to just import some jQuery via CDN, but I decided that I wanted to fully understand what was going on, and thus decided to rewrite it in plain JavaScript.

“Mayhaps, in the span since first we met, an AI hath vanquished thee, mighty jQuery,” I said to my screen as I Googled “jQuery to JavaScript converter.”

Surprisingly, there was a tool which actually did something, or enough to get me started. Despite some very strange copy on their page, the WorkVersatile converter did deliver on their promise of only “some errors” after conversion.

The original jQuery:

$(".animated-progress span").each(function () {
$(this).animate(
{
width: $(this).attr("data-progress") + "%",
},
1000
);
$(this).text($(this).attr("data-progress") + "%");
});

… and the invalid JavaScript output:

document.querySelectorAll(".animated-progress span").each(function () {
this.animate(
{
width: this.attr("data-progress") + "%",
},
1000
);
this.innerText = this.attr("data-progress" + "%");
});

My end product; instead of innerText, I used the Django template to fill in the element’s text:

document.querySelectorAll(".animated-progress span").forEach(ele => { 
  
  ele.animate(
  [
    { width: ele.getAttribute("data-progress") + "%", },
  ], 
    {
      duration: 1000,
      fill: "forwards"
    }
  );

});

Using Pivotal Tracker to Manage Your Project

Pivotal‘s free tier might be just what you need to get started or re-energize your side project.

Combining Pivotal’s project management software with pomofocus.io — those two tabs in my browser have really boosted my output and kept me organized. So far, the free tier of Pivotal Tracker has been enough to get my little project off the ground, so I thought it might be helpful to share.

You create an account and then name your project. Then you can add user stories or features which you eventually plan on adding to your app or site (your product roadmap).

Adding these features is pretty simple, and you can put as much detail as you like.

Pivotal Tracker project dashboard screenshot
The Pivotal dashboard shows you an estimated project schedule, status, and backlog

Working solo, some of the features like “Accept”/”Reject” buttons aren’t really useful (think: pull request meme of awarding oneself a medal). Also, I’m not quite clear on the project velocity calculation, which seems like a powerful feature that I’m not taking full advantage of at the moment (here’s a 2-year-old video explaining the velocity calc feature, or you can actually — shudder — read the docs). Other than that it’s pretty amazing for my needs. And it’s nice to know that I can still have up to 5 users should I need to bring on help.

This sort of freemium app is really enabling a lot of startup and small business innovation, since a lot of side projects don’t generate income at first. I hope to pass it along with a freemium app of my own!

Testing in Django, or “How long has that been broken?”

When the phrase, “how long has that been broken?” enters into your vocabulary, it’s probably past time to add tests to your project.

Finally got my tests going with some momentum. I’ve also adjusted the dashboard view a bit over at JobTrek; although I’m lacking time to design a UI, at least it looks a bit better now. (Leave a comment if you think I shouldn’t wait to find another Bootstrap theme.) And dear Lord help me, I’ve bought a domain name and even coughed up the $7 for the Heroku Hobby plan with SSL.

I’d learned some basics in the Kickstart Coding course, but couldn’t get my basic tests to pass. Turns out I’d been adding my tests to the wrong tests.py file, in the wrong app directory. Hopefully this blog post will save some random person out there from making the same mistake!

Another beginner issue for me was testing templates and content for anonymous versus authenticated users — more on that in my next post.

For some good, free content on testing in Django, check out VeryAcademy’s series on YouTube.

The J.O.B. search continues — is there an app for that?

The fun-employed phase has lost its luster; I’m not quite at the soy-sauce-over-rice-for-dinner stage, but let’s just say it’s crunch time. Now firing off apps left and right, sending LinkedIn DMs, and contacting recruiters and former co-workers is the daily grind.

In side project news, I’ve abandoned SelfWars and all those Vuetify components. Also, I’m finally digging in to SQL joins (studying via Kickstart Coding,) after avoiding it like the plague for so long.

Lately been building a job search progress bar web app in Django. Fun, fun, fun! Wanna take a sneak peek?

“Your search will take approximately 8 weeks”

Step 1: register — I know, I know (a user story for anonymous sessions is on my plate)

Step 2: add some jobs you’ve applied to, using the simple form

Step 3: view your interview rate percentage and offer rate percentages on a handy pie chart (more graphs are planned)

See if your interview rate is around at least 15%, and see approximately how long your search will take. Based on lovely research from TalentWorks.

I know I said ‘progress bar,’ but for now it’s in the form of a pie chart; hey, who dun’ like pie?

I realized I was giving all this ‘daily grind’ advice out to Nucamp students, but when folks see in starkly-presented numbers just how long their job search could take at a certain pace, I think it’s got the potential to be an illuminating kick in the pants.

Jamrock, and updates

Just back from wonderful travel visiting relatives around Jamaica. It was much-needed refreshment, and my first international trip since Sweden, back in the ‘before times’.

obligatory beach image

It was great to spend a lot of time with family. I specifically went to see my aged grandma, who is in her 90s but is still sharp as a tack and still going up and down staircases — bodes well for the ‘ol genome. When I complained about carrying some extra pounds, she chided me that I could use a few trips up and down some steps as well. The Greatest Generation rolls like that!

My intrepid hubby rented a car and drove around the island. Everyone, including me, was pretty impressed with his skills — next time I will definitely fly into Montego Bay instead of Kingston, and rent a car.

Perhaps Portland, Jamaica’s potholed roads are a good metaphor for a coding career.

gif of car interior with view of bumpy road
the country roads are finally being repaved, but in the meantime…

(They are making improvements, but in the meantime here is a hilarious commentary on the lack of repair.) Driving those roads certainly make one question one’s life choices. But then there is a smooth stretch of pavement for a while, and all the struggle and perseverance seems worth it.

2024 EDIT: The role I posted about. The company seemed great, the people were amazing, the kudos on my progress were good; even React was not as annoying as I’d remembered. I was lead to believe that my hiring was just one of those weird miscommunications of expectations, which sometimes happens when both sides are well-intentioned and perhaps a bit starry-eyed. Once I was reprimanded for ‘slow progress,’ I started pulling extremely unsustainable hours. It turns out that the company was facing severe financial difficulties after over-hiring — I found out that people were laid off or intentionally pushed out. Now I wish I would have listened to advice not to quit, and rode out the tough schedule. Likely at the cost of some health and home life, sure, but at least I would have been able to collect unemployment and maybe even land another role quickly. /END 2024 EDIT

But discovering that I can do the job, ‘drinking from the firehose’ of web development and seeing leaps of improvement, is very validating.

So I’m again at a small fork in the road — should I forge ahead with another dev role, or should I take what I’ve learned and revisit the customer support/management-y realm. Before the Jamaica trip I was experiencing a lot of angst about it, but I’ve been reminded that a lot of people dream to have such decisions before them! My gut says to apply for both tracks and see what turns up. I think I shall sleep on it.

Closing one chapter and starting a new one

My “Drafts” folder has more blog posts in it than one might think. But I surely had to post this one.

It’s been a minute since my last post, and what do you know: we are back in NYC. And it almost feels like we never left — nobody asks me, “you military?” or “how long you been here” in town. Everyone is from someplace else, and they have pretty tasty poke here, too.

I got a wonderful job offer with a new company, which, exciting as it is, means leaving the great team at Nucamp. I’ve been there for a couple of years, first as a Web Fundamentals Instructor, then as a Student Advisor and Advisor Team Lead.

teaching a lovely group the Web Fundamentals in early 2020

The Nucamp team is helpful, funny, and kind, so I’ll really miss them, and hopefully I can check in via Slack when I have time. It’s really something very special that’s being built there, but I am leaving to pursue…a software engineer role!

Finally I’ve been blessed with this opportunity, after doing freelancing and teaching. It’s humbling to be reminded so sharply of all the “good gift[s]” and “perfect present[s] from above, coming down from the Father of the celestial lights.” It’s also a bit scary, but good-scary, like climbing a roller coaster. And that’s where the growth always seems to occur — in the scary bits. I’ll post more as the weeks and months go by, but as a friend of mine often says, big tings a gwan