A few of the jobs I'm applying to are either Vue.js-centric, or a mix with some Vue and some React.
I ran through Vue Mastery Intro to Vue.js course. It's interesting how this series of courses seem so officially endorsed - and they are pretty great! Like Wes Bos React course, they have a nice player to go through a series of videos starting with a basic core and adding complexity- but with this course, each lesson has a codepen set up and ready to go, with the lesson's code already entered and a challenge still left to do.
It seems like that "just run it!" setup is easier to do in Vue - it's impressive that you can just include one script tag and all the basics work. (Vue also has a pretty extensive build system, while React seems a bit more roll your own webpack or what not - or use the giant beast create-react-app.)
In some ways, React felt like a maturation of the best parts of jQuery, and similarly Vue feels like a bit like AngularJS. Specifically, React + JSX let you plunk bits of DOM in your JS without guilt, and so lets you use regular Javascript control structures. Vue and AngularJS take the approach of integrating conditionals and iteration into the tags. Instinctively I prefer how JSX feels more like "plain old HTML", but I could get use to Vue's approach. I still find stuff like
<ul>
<li v-for="item in items" :key="item.id">
{{ item.message }}
</li>
</ul>
a little odd - the way the "for" is sort of a child attribute of what is properly "inside" the loop. (But it seems like Vue avoids forcing the developer to have all that weird mandatory infrastructure javascript to make the tag logic magic happen that AngularJS demanded)
I also love how Vue wraps a component - it's a bit opinionated, but you build a map-like object with data:, method:, template: etc keys -- they may well have found a sweet spot of opinionated but not TOO opinionated. I think the approach is quite favorable to React's file-component conflation.
Similarly, "emit" for having a child communicate back to the parent seems pretty keen. It's a basic idea that scales up well, to the eventBus model, or more advanced things using Vuex - a smoother ramp up then React's "either deal with children/parent state via props or use Redux"
Still, I'm not quite sure if Vue is quite as... I dunno, industrial strength as React - that might be because I've only seen tutorials for it, not real code. And admittedly the list of top sites built with React seems a bit more impressive than the top sites made with Vue.js. But both seem to get plenty of love in the 2019 "State of JS"...
Thursday, April 30, 2020
Wednesday, April 29, 2020
input type="tel" regex pattern for US 10-digit phone numbers
HTML5 has a <input type="tel"> but it's not very restrictive, in particular if you have an international audience, you need to think carefully.
For Porchfests, I think it's ok to assume "US", and my partners wanted some additional data validation. Building off the example on the MDN <input type="tel"> page:
<form>
<input type="tel" id="phone" name="phone"
pattern="\(?[0-9]{3}\)?[-\.\s]?[0-9]{3}[-\.\s]?[0-9]{4}"
required>
<small>Format: 123-456-7890</small>
<button>go</button>
</form>
Optional parens around area code, and then space, dash, dot, or nothing between the 3/3/4 digit sections. That will allow variants like "(555)123-1234", "555-123-1234", "555.123.1234" or straight up "5551231234".
For Porchfests, I think it's ok to assume "US", and my partners wanted some additional data validation. Building off the example on the MDN <input type="tel"> page:
<form>
<input type="tel" id="phone" name="phone"
pattern="\(?[0-9]{3}\)?[-\.\s]?[0-9]{3}[-\.\s]?[0-9]{4}"
required>
<small>Format: 123-456-7890</small>
<button>go</button>
</form>
Optional parens around area code, and then space, dash, dot, or nothing between the 3/3/4 digit sections. That will allow variants like "(555)123-1234", "555-123-1234", "555.123.1234" or straight up "5551231234".
Tuesday, April 28, 2020
es6 goodness
Prepping for job interviews, you become aware of the overlap between things you use on a regular basis (even daily) and things you might still get caught up on feeling the pressure of an interview... if you're a cautious, highly-iterative programmer like I am, there's a lot of knowledge you don't quite have in your head, but you know the basic idea and even the gotchas and you carefully test and move forward.
Anyway, I'm reposting Amber Wilkie's Everything I learned from ES6 for Everyone, which along with ECMAScript 6 - New Features: Overview & Comparison are great reminders of how not to look like an old JS fuddy-dud - lots of examples showing the old and new way of doing things.
I do think I need to up my game in staying up with hackernews and what not - ECMAScript is still evolving though mercifully the "big bang" of ES6 seems singular.
Anyway, I'm reposting Amber Wilkie's Everything I learned from ES6 for Everyone, which along with ECMAScript 6 - New Features: Overview & Comparison are great reminders of how not to look like an old JS fuddy-dud - lots of examples showing the old and new way of doing things.
I do think I need to up my game in staying up with hackernews and what not - ECMAScript is still evolving though mercifully the "big bang" of ES6 seems singular.
bouncing blocks in 8-bit
An online friend of mine, Matt McIrvin was talking about a cassette with some simple public domain-ish games he got as a throw-in when he got his first Atari 8-bit computer. It made me think of one of my favorite software toys, "Jane's Program":
(I keep forgetting the name of it, looking for it to be "Jesse's Program" "Jane's Game" or something like that.)
It was made by Douglas Crockford, who worked on a lot of Atari stuff including Lucasfilm's games, and later he became famous in the Javascript world - partially by helping to popularize the use of JSON, showing how simple collections and maps were much easier for humans to understand than all the pointy and obnoxious bits of XML.
(It's interesting looking at his career trajectory vs, say, Jim Butterfield, whose tech career seemed to rise and fall with the 8-bit Commodores he established his name with.)
Ha, though I just realized Crockford was not also the "De Re Atari" guy- that was Chris Crawford... an easy enough mistake to make.
Anyway, "Jane's Program" is lovely, and honestly would be a tricky thing to replicate even with today's abundance of processing power - it's not immediately obvious what kind of data structure would best capture the blocks as whole objects (with elasticity and velocity) as well as a chunky particles "blocking" columns and supporting or colliding with particles from other blocks.
(I keep forgetting the name of it, looking for it to be "Jesse's Program" "Jane's Game" or something like that.)
It was made by Douglas Crockford, who worked on a lot of Atari stuff including Lucasfilm's games, and later he became famous in the Javascript world - partially by helping to popularize the use of JSON, showing how simple collections and maps were much easier for humans to understand than all the pointy and obnoxious bits of XML.
(It's interesting looking at his career trajectory vs, say, Jim Butterfield, whose tech career seemed to rise and fall with the 8-bit Commodores he established his name with.)
Ha, though I just realized Crockford was not also the "De Re Atari" guy- that was Chris Crawford... an easy enough mistake to make.
Anyway, "Jane's Program" is lovely, and honestly would be a tricky thing to replicate even with today's abundance of processing power - it's not immediately obvious what kind of data structure would best capture the blocks as whole objects (with elasticity and velocity) as well as a chunky particles "blocking" columns and supporting or colliding with particles from other blocks.
Saturday, April 25, 2020
the bad ux of a bottle of bleach
So Bleach expires, yet Clorox likes to pretend that "E620050 MD2 5 18" is a good enough code to let us figure out how old it is. I think that means "made at factory E6 in the year '20 on the 050th day (i.e. mid-February) but dang, why are they being so obscure?
Making it worse it sounds like sometimes the year is one digit? and sometimes they glom on two digits at the end, before the day of year. This is a bad time for not providing an online calculator or using a more human friendly system.
Making it worse it sounds like sometimes the year is one digit? and sometimes they glom on two digits at the end, before the day of year. This is a bad time for not providing an online calculator or using a more human friendly system.
Thursday, April 23, 2020
looking for my next gig
So, I got caught in a round of layoffs at my last job.
I'm moderately proud of my online https://kirk.is/resume/. In 2016 I came up with the interactive bit, that you could hover or click on technologies or jobs and the corresponding job (or technologies) would highlight.
I was also smart with my media queries so I can just save to PDF and get a lovely print version
For 2020 I cleaned up the code (still jQuery, which has a funky smell for many folks but is probably a decent tool for a document-based microproject, and it didn't seem worth redoing all the animations in CSS... jQuery really took care of a lot of little things.) and added some graphics in the same style as my header:
So, if you are reading this and looking for a top-notch UI developer, let me know!
I'm moderately proud of my online https://kirk.is/resume/. In 2016 I came up with the interactive bit, that you could hover or click on technologies or jobs and the corresponding job (or technologies) would highlight.
I was also smart with my media queries so I can just save to PDF and get a lovely print version
For 2020 I cleaned up the code (still jQuery, which has a funky smell for many folks but is probably a decent tool for a document-based microproject, and it didn't seem worth redoing all the animations in CSS... jQuery really took care of a lot of little things.) and added some graphics in the same style as my header:
So, if you are reading this and looking for a top-notch UI developer, let me know!
Thursday, April 16, 2020
Subscribe to:
Posts (Atom)
