Quantcast
Channel: Grant Winney
Viewing all 348 articles
Browse latest View live
↧

Weekend Review #1

$
0
0
Weekend Review #1

A thought that occurs to me, from time to time, is how the course of our lives seem to follow Heisenberg's uncertainty principle:

[W]e cannot measure the position (x) and the momentum (p) of a particle with absolute precision. The more accurately we know one of these values, the less accurately we know the other.

When I sit back and think about where my life is going, and what to learn or build or do next, my momentum comes to a stand still as I consider which position to face next. And when I make a choice, then I no longer consider my position but speed off in whatever direction I chose. I'll apoligize to all physicists now.

My point is, it's easy to keep running, and either not bother to pause and take stock in the progress you're making, or not realize you were running in the wrong direction. So I'm just going to stop and think about the week's accomplishments.

Reacting to React

I think I'm finally getting the hang of React, with its functions and hooks. This week I learned how useEffect is about side-effects, and Material-UI is about not reinventing the component wheel. Also, when it comes to a GET request with query parameters, the concern is not with the SSL tunnel, but what happens at either end.

I also got to do some work in C#, which was great. That's my wheel-house right there, and it was good to play around in it a bit. Named Tuples are so convenient, and the fact that you can deconstruct them.. amazing! BTW, if you use XUnit and find yourself with a lot of similar tests that only differ in the value they're testing, check out InlineData, ClassData, and MemberData. For NUnit, check out TestCase and TestCaseData. Even MSTest is covered with DataRow. πŸ‘

Spring has sprung

Enough about programming. The weather has been unseasonably unseasonable, even for Ohio. Guess mother nature figured the pandemic wasn't enough.

But we've turned a corner now, so I picked up some sprigs and seeds last week, and everyone chipped in to clean up and plant the garden. In a few months, we'll have dozens of tomatoes and hundreds of beans and peas.. mmm! Half of what we have now are perennials... rhubarb, asparagus, strawberries, rosemary, mint. Makes life easier, assuming you don't plant something you get sick of.

Playground 2.0

When you're stuck at home, you start getting creative. Can't bring the kids to the playground, so why not bring the playground to the kids? Also, our yard's a swampy mess after a light rainfall. But no more! I mean, 108 feet of landscape timber, 100 feet of black plastic, and 6 tons of gravel later and... no more!

Flying the coop

This one ain't my accomplishments, but someone accomplished something.

A few little black and white birds have been nesting in a bird house hanging from our front porch, and just this morning they kicked the kids out, who spent the day hopping around the yard. And now.. who knows. They're not in our yard or the bird house. They either learned to fly or called an uber.

They're tiny little black and white birds.. maybe warblers or chickadees? Anyway, it's been fun watching them nest; hopefully something else call it home too.

That's it! It's been a good week. We're going into a long holiday weekend, with lots of warm 80Β° weather next week. Lots to look forward to. Take that covid-19. πŸ™„

↧

Buying, building, and something in between

$
0
0
Buying, building, and something in between

In our neighborhood, homes built in the 70s had 2-car garages in the strictest sense only. They could fit 2 cars as long as you like crawling out your windows Dukes of Hazzard style. Trying to fit in a riding mower, small trailer, snowblower, bikes, lawn tools, ladders, etc, on top of that may be a jigsaw puzzle enthusiast's dream, but I've hit the limit of my creativity.

And so I've been toying, for about a year or so, with the idea of building my own shed. I'm in a better position than others might be, having amassed a decent set of tools and experience trying my hand at a variety of projects over the last few years, but sometimes I think experience can lead to an inflated estimation of what you or I can achieve - at least, within a reasonable timeframe.

There's a narrow line to walk. On the one hand, it's good to push yourself to learn more, to be courageous in trying something new even knowing you might fail. It's built into us from the time we take our first tentative step (or jump a hurdle, ice skate, or change a set of brakes), fall flat on our faces, then get up and try again. We reinvent the same old wheel because it's how we learn.

On the other hand, there's a certain wisdom (if it is wisdom, and not simply fear) in accepting that someone else already honed the skills we're after, and take advantage of that. In realizing they've done it every day for several decades.. or even their whole lives, passed down between generations. In acknowledging that we can't match their skills and techniques without putting in serious overtime.

Buying, building, and something in between
Photo by Randy Fath

Once upon a time, Picasso supposedly drew someone's portrait and charged a ton of money for it. A woman balks at the money Picasso charges for a lovely portrait that only "took you a second to draw", to which he responds with, "Madame, it took me my entire life." As a consumer, if you feel that what you're getting isn't worth the sum of the immediate and tangible parts, try thinking about the less tangible.

You're buying materials, and maybe the time to assemble them. But you're also buying years of skills, tools, mistakes made and lessons learned. You're buying someone's singular dedication to something at the expense of other pursuits, and learning to see the world from a different angle than the rest of us.

Buying, building, and something in between
Photo by Thierry Milherou

There's a third way to look at a situation - not strictly buying, not strictly building, but something in between. Look at it as getting a boost or head start from someone else's skills and tools and experience. Buying a product - a shed or anything else - doesn't mean you can't learn from it - extend it, modify it, change it.

Even if it's used instead of brand new, you have a unique chance to see how something is done, in its finished and working state, and maybe add something to it. And down the road, when you've built up your own skills and dedicated more of your own time to a craft, who knows - you may create something even better.

↧
↧

The first website is still online (again)

$
0
0
The first website is still online (again)

Back in the 90's, everyone wanted their own little corner of the web, and thanks to geocities, tripod, and angelfire, anyone could. Like, literally anyone. You could just jump in and.. make a site. About Christmas. Your DJ side business. Whatever you watched on Saturday mornings.

There was something for everyone - auto-playing midis, nauseating color schemes, animated everything, visitor counters, ... just toss everything you can dream up in a hat, shake it up, and dump it all out on every page. Sigh. Those were the days.

I didn't save these sites 25 years ago in the event I started a blog though. Nonono.. you too can browse the best the 90's had to offer! Sites like geocities.ws and oocities.org were quicker than the rest of us (well, I don't know about you, but me anyway), and scooped up a ton of sites after yahoo announced the party was over.

My first website was hosted on geocities back in the 90's, and was all about one of the most successful console games ever.. Legend of Zelda: A Link to the Past. I must've played it through a couple dozen times, and eventually wrote up a walkthrough of it with pictures and everything. My corner. My contribution.

The first website is still online (again)

I cared about it so much that, even though I remember editing and uploading static files using CuteHTML and CuteFTP (oh wow, they're still available.. wonder if CuteHTML supports React and jQuery now), I didn't hang on to a copy of the site. That's really unfortunate.. seriously, it's everyone's loss. It probably looked like Sheila's Shellter up there, but with a different web ring and, uh.. called The Canon of Ganon or something clever. On second thought, it died a good death.

Even further back

Geocities was hardly the beginning of the web though. And as amazing as it is that those sites are still around, did you know the very first site ever is online too, just as it was from 30 years ago? It's amazing.. a few pages that basically linked to the entirety of the Internet at the time. You didn't need google, just a sheet of paper!

If you want to learn more, CERN (where the web was born) dedicated some space of their own to tell the story of the birth of the web.

The first website at CERN – and in the world – was dedicated to the World Wide Web project itself and was hosted on Berners-Lee's NeXT computer. In 2013, CERN launched a project to restore this first ever website: info.cern.ch.

On 30 April 1993, CERN put the World Wide Web software in the public domain. Later, CERN made a release available with an open licence, a more sure way to maximise its dissemination. These actions allowed the web to flourish.

It's fun to checkout the awful pages of Geocities, but this is real history.

↧

Your fast, my slow

$
0
0
Your fast, my slow

Do you ever wonder if some end-user is sitting at their desk right now, eye twitching spasmodically while a screen you helped write takes 30 seconds to load, cursing your name and the names of your children for all eternity? If you're on a team, at least you can all share the blame. If it's an older company, you've got legions of bygone devs to toss under the bus too. Bonus!

When I left my first gig, I took solace knowing I was giving the team some breathing room for a few months. "That laggy finance screen? Those slow reports? The login timeout issue? Yeah, those were all part of Grant's last project.. the, uh, financial reporting authentication project."

In all seriousness though, devs don't dev on the same caliber of machine the consumers of our code will be using, and for good reason. Daily, I'm running several large pieces of software that a customer will neither have nor need. They may be running on a top-of-the-line machine, but it's doubtful.

There's this post from way back proposing a programmer bill of rights (oh boy), one of which was apparently fast dev machines. And there were like a dozen comments under it with some version of, "No no nonono, we don't need faster computers. We'll just make software even more bloated and the end users will find it even more frustrating to use!"

While reducing dev laptops to whatever that worst case might be is a ridiculous idea, I wonder, in the age of virtual machines, if it wouldn't be reasonable to setup a vm with severely limited resources - worst case scenario - and occasionally run the software in it as a reality check. I may have to try that out sometime...

↧

What's a word cloud and how do I make one?

$
0
0
What's a word cloud and how do I make one?

You've most likely seen word clouds before, like in the sidebars of various blogs, even if you didn't know what they're called. Those odd pictures with lots of words, in different sizes and colors and maybe even directions. It's a fun, easy way to present words that are related to one another, and to quickly show which ones are more significant in some way.

Pixabay has tons of them, and you can even create your own. The one I created below with WordItOut shows the frequency of certain words from the first chapter of Lord of the Rings, although the relative sizes of various words could just as easily represent any numerical data - popularity, frequency, importance, etc.

For example, Infogram lets you easily create a word cloud based on any set of data you give it. Using Stack Exchange Inc's annual developer survey data, I pumped two sets of data into Infogram - developer types, and years of coding experience by type.

What's a word cloud and how do I make one?

Do you notice anything just by looking at the relative sizes below, even if you didn't know the exact numbers? At the end of the day, most devs either work on the front end, back end, or both (full-stack), so naturally those are largest.

Senior execs and engineering managers report the longest coding experience, so either developers eventually move into managerial roles, or managers like to be hands-on and dabble in the codebase. Desktop devs report more experience too, as do system and db admins - makes sense, since that was the majority of work before mobile devices and web development blew up in popularity (relatively recently).

In general, word clouds set the most significant word(s) in the center, right in front of your eyes. As words become less significant, they're placed further to the outside edges, perhaps even in lighter colors or thinner fonts.

While online tools make it easy to create a word cloud, there's no reason you couldn't make one yourself in the language of your choice. You just need to be able to read in some data, then write it out to the screen in a manner that's weighted based on that data.

Here's a quick example I threw together using Python and the built-in Tkinter module for drawing to the screen. In a very rough way, the smaller the percentage gets, the more faded I make the color, and the farther I move it from the center.

import random
from tkinter import *     # use Tkinter for Python2
window = Tk()
window.title("Welcome to LikeGeeks app")
window.geometry('800x480')

mid_h = 320
mid_v = 240

results = {
    'Back-end Dev': 55.2,
    'Full-stack Dev': 54.9,
    'Front-end Dev': 37.1,
    'Desktop / Enterprise': 23.9,
    'Mobile Dev': 19.2,
    'DevOps': 12.1,
    'DB Admin': 11.6,
    'Designer': 10.8,
    'System Admin': 10.6,
    'Embedded Apps': 9.6,
    'Data / Business Analyst': 8.2,
    'Data Scientist / Machine Learning': 8.1,
    'QA / Tester': 8,
    'Data Engineer': 7.6,
    'Academic Researcher': 7.2,
    'Educator': 5.9,
    'Gaming / Graphics': 5.6,
    'Engineering Manager': 5.5,
    'Product Manager': 5.1,
    'Scientist': 4.2
}

def rnd_pos():
    return 1 if random.random() < 0.5 else -1

for dev_type, percentage in results.items():
    start_pos = int(165-(percentage*3))
    color = '#%02x%02x%02x' % (255, 50+start_pos, 50+start_pos)
    lbl = Label(window, text=dev_type, font=("Arial", int(percentage)), fg=color)
    lbl.place(x=mid_h-(start_pos*rnd_pos()), y=mid_v-(start_pos*rnd_pos()))

window.mainloop()

It ain't the prettiest, but it's okay for a non-pythonista in under an hour. You could do the same in the language and framework of your choice, of course. Word clouds might not be the best representation of data at your next work meeting, but in the right (casual) setting it might be a good way to make sure someone's focus goes right to whatever's most important... however you happen to define that!

Feel free to share a snapshot or link to your own word cloud in the comments below. Good luck. Have fun! πŸ™‚

↧
↧

Weekend Review #2

$
0
0
Weekend Review #2

It's tough to believe we're in June already. Maybe part of the reason it doesn't feel like it's nearly summer is because our summer rituals haven't really started! Amusement parks aren't open and there's no neighborhood yard sales, but at least you're free to invite your 9 closest friends to a barbecue as long as they eat in a circle that spaces them 6 feet apart. Completely natural, lol.

Alright, enough of that. I want to stay focused on what's been good about the week, and I'll start with the end. It feels like the stars align, when a PR I submitted is working, fully tested, and approved and merged before the end of the day on Friday. It doesn't happen often, but it did today. It's like finding a good stopping point on a project right before you have to leave the house, or having 40 browser tabs open and being able to close them all. Sighhh

There's so much to learn in React. This week was requesting (fetching) data, allowing it through, and mocking it out for unit tests. Never forget the tests! I also got to implement routing, which (like most things once you know how) was easier than I thought it'd be. It's interesting how it intercepts the URL and maintains browser history, while (re)loading components to dynamically build the page.

On a personal note, I bought a shed (not the one in the picture, lol). You know you're an adult when buying a shed is exciting, but with 2 cars, 5 kids, and a woodworking hobby, there's never enough room. This has been on my list for awhile. I may not be able to get my car in the garage until I'm 60, but I'm sure as heck gonna have room to stretch. πŸ˜„

↧

Surviving or Thriving?

$
0
0
Surviving or Thriving?

Our collective response to the wuhan coronavirus was like hitting the brakes, pulling the emergency lever, and slamming the transmission into park, all at once. It worked, and we stopped, but there's been a lot of collateral damage. Yeah, you'd ruin your car if you did that, but if the alternative were sailing over the edge of a cliff, wouldn't it be worth it? You can never know for sure how much worse something could've been without action, but then the spanish flu infected half a billion people and killed 50 million at a time when the world had ΒΌ the population.

Surviving or Thriving?
Not social distancing. (source)

What surprised me is how quickly I was ready to chuck out some important things from my life.. or at least, delay getting back to them. Our church was streaming Mass online, but when they reopened a couple weeks ago (with a standing dispensation that says we don't need to go), I found myself with a take-it-or-leave-it attitude. Likewise, the gym I've gone to at least a couple times a week (for years!) finally opened back up, and I found myself not that excited to go back to classes.

It wasn't an "I haven't worked out in months, this is gonna be bad" feeling, but more of an... "I've survived this long without it, how badly do I really need it" feeling. If I were considering my Netflix subscription or ordering takeout, that'd be perfectly okay. The problem is, it's been with much more important stuff, and I've been away just long enough to think I'm okay without them, but barely long enough to actually feel the effects yet. After all, a few months without exercise is ill-advised, but a lifetime without exercise is deadly.

Surviving or Thriving?
This doesn't count as exercise. (source)

I went back to Mass a couple weeks ago. Same with working out. It's all weird, the hand sanitizing, the social distancing, the face masks. It's a pain. But it's good to be back - "feels good" sure, but also "objectively good". I feel involved again, revitalized. I feel like this isn't the new norm (I hate that phrase), but simply something we have to do for now... until we don't.

So if you find yourself in the same boat, wondering if the things that used to build you up (body, mind, and soul) were ever really that important, don't make the decision like this. It's just about the worst time to make that decision. Trust your past self. Get back to what you were doing. Get back to normal.. or as close as you can. When you're back into the things that helped you not just survive, but thrive, then you'll be in a place to decide whether or not you truly need those things in your life.

↧

Microsoft respects our privacy, shows it by invading our privacy

$
0
0
Microsoft respects our privacy, shows it by invading our privacy

If you have new software and want to let people know while simultaneously respecting their privacy, there's a long list of things you might do. Send an email you obtained licitly and respect opt out requests. Advertise on related websites. Publicize it on Product Hunt, promote it on social media, or just let people discover it organically and share it over time.

Or if you're Microsoft and have a lousy piece of software no one's excited about, abuse your position as an operating system provider to push it via the Windows Update process. I woke up to this the other day, as I'm sure millions of other users did, with no way to close out.

Microsoft respects our privacy, shows it by invading our privacy
Microsoft respects our privacy, shows it by invading our privacy

Locking the entire screen, preventing any other user action besides continuing through it or killing it with the task manager, that's not enough. No, if you're gonna abuse your users, do it right. Add icons to the desktop and taskbar, pin them, and even make it so the next time they open a bookmarked page from their desktop they get a prompt to "do more online with the ho-hum browser from Microsoft".

What's really wonderful is the prominent placement of "Your privacy is our priority" on the main screen that locked everything else. Did they forget the word "low"? Seriously though, hugely awful decision Microsoft... and an antitrust lawsuit just waiting to happen.

But now that I've been reminded of its existence, who knows... if Brave, Firefox, Opera, Chrome, and Netscape 6 in a Windows 98 VM don't work out, maybe I'll give it a try.

↧

Viewing all 348 articles
Browse latest View live