Ballin

12.16.2017

I got a new toy. Well, for me it's a toy. Many years ago I gave up using mice and went with trackball(s). My trackball of choice was the Logitech Trackman Marble as I can use my fingers to roll the trackball instead of my thumb. I seem to have finer motor control over fingers. A Logitech trackball lasts about 3 years for me. That's when the left button decides to work intermittently. I don't think it's a problem with the components or a connection gone bad, but instead a build up of gunk from my fingers clicking the button for years. I know it sounds gross, but given the dirt I clean out of the ball holder (yes, that sounds bad too) about once per month I can only imagine what creeps into the crevices of the button.

I could try to clean it out, but given that one of those trackballs is $20 it's just easier to get a new one.

Well, the trackballs used to be $20 when I could trot down to CompUSA and pick one up. The last one I got (for work, Aug 2016) was $23.

Whenever it's time to replace a trackball I look to see if there's anything new that I want to try. Kensington has a nice selection, but the ergonomics don't work well with my hand placement. I could swear I've tried others but nothing else comes to mind just yet.

The latest flakey button induced search brought me to the ELECOM M-HT1URBK Wired Trackball Mouse. This one caught my eye because

After watching the inventory go from low to out-of-stock and back to low, I ordered one to try out. Sure, it was $60 instead of $23, but given the number of hours per day I would use the blasted thing if it was even a marginal improvement over the Logitech series I'd been using for at least a decade then it would be worth it.

After 4 days of using the one that came in, I like it enough I've ordered another one to use at work. The size is perfect for my hand. All the buttons are naturally located for where my fingers want to fall. The scrollwheel is quickly my favorite part. The buttons are a little soft when they click, but only because I've been paying attention to all the little details. When I press naturally those buttons act like they should.

Now, the funniest part to a boonie hick like me was that the package didn't have a bit of English on it. Elecom is a Japanese company, so I'm going to guess all those characters I couldn't read were Japanese.

Except "HUGE trackball". I could read that one.


programming/interweb

1 DealYear

12.10.2015

Today I have been at DealNews for 1 year.  I'm not sure I've ever been as happy to work some place as I have here.  That's in large part due to working on government funded contracts for so long and needing a change, but it's also due to the environment at DealNews.  I like it.

The balloon filled office above is mine. It wasn't like that today, that was how it looked on the afternoon of the Wednesday before Thanksgiving. Why? I wasn't there while everybody else was watching Ant-Man. Oh, there's more of a reason than that, but that was good enough for most of the people there to blow up a couple of the 280 balloons that found their way to my office. It wasn't something done out of spite or meanness, just a fun little prank.

The work is fun, but often frustrating. I'm still learning how to change my coding style to the current company style. It's not easy as I've spent a very long time doing things my way/whatever works now/just get it done. That is a very hard mindset not to revert to. Often I do things the hard way because that's the first (and often second) way of getting something done that pops into my head. But I'm learning. They haven't gotten rid of me yet, and I hope they don't. But even after a year that's still something (a fear maybe?) that motivates me to keep trying.

Now to make some progress to writing DealYear #2.


programming/interweb random

Javascripting & MVC

10.15.2015

For the past couple of weeks at work I've been writing a lot of Javascript. Traditionally Javascript and I don't get along. I'm not completely sure why, Javascript has always been a part of web development. Even in the 90's, although it was avoided because it was evil and could be coerced into doing bad things to your computer. These days, Javascript is a fundamental part of the modern online experience, responsible for the seamless back and forth of data that doesn't interrupt the web page you're looking at. It puts the "fun" in "fundamental"!

It's also responsible for a good chunk of the "mental" in "fundamental" too.

Granted, I don't know the right way to do a lot of things in Javascript, but I can generally hack away and figure them out. Gone are the days of embedding events in an object to go do special things when you click/type/look at a textbox or a button. Now the hip cool thing is to search the Document Object Model for that textbox and button, then add a listener object for when you click/type/look at it. It's of great benefit to add listeners as you can add multiple listeners to a textbox or button. And that's got to happen at least a couple of times every few years.

The above is a by-product, I think, of modern programming separating the code from the design. Adding those embedded events meant that I knew, from a code standpoint, that certain things were fairly certain to happen. With listeners, it's not imperative for those things to happen and they (I think) handle things better when stuff's missing.

But I still make code and design. I don't hand off the logic to somebody and say "go lay this out and display it properly". I'm still in 1997 when there was 1 guy that did everything for a website. Knowing what a pain it was to be that one guy, I should be better accepting of how code/design is at least trying to evolve.

But then I look at the file I worked on last week. It was an HTML table that had 3 columns on each row that you could click on and it would either toggle Yes/No text that was displayed, or edit a number that was present (without turning into a textbox). It took 2½ days for me to make, and it even has a spiffy green background that would fade in to show you had successfully edited a field thanks to a 2 minute Google search-copy-paste. The problem was that the 1 new file and 1 edited file I used was implementing the old, pseudo 1997 way of things. I had to convert it to the new, hot 2015 way.

A week later, with 7 files involved (not counting the usual included files each page on the site has) it was finally working, doing the exact same thing it had been doing a week earlier. It shouldn't have taken that long, but I was fighting with Model-View-Controller object interaction AND that damn Javascript. Javascript that I had working once but all the references changed, somehow, thanks to the MVC setup.

But I learned. I learned the hard way, the painful way, which means it should stick.

And then when I was done, I learned there was a 2nd set of things to do that nobody told me.

Now I'm not done again. I have to return to the breach of MVC and Javascript. As painful as it is, I actually enjoy it. It makes more sense as I step through and use parts. Maybe not common sense, but I can see why it works. And even though a different command may work just as well, I'll use this new stuff I'm supposed to.

One of those reasons to use MVC and our homegrown Javascript objects that just seem like a glorified wrapper popped up earlier. When I develop and test I use Chrome and I often forget to try different browsers. I'm just lazy that way. I've got a Javascript function that will loop through and show all the properties of a Javascript object. When I wanted to toggle those Yes/No fields earlier, I looked and saw an innerHTML property that had what I wanted. Great, I used that. When it came time to edit numbers, innerHTML messed me up when I went to validate that number because any extra characters (space, line break) were converted into HTML and thus made my number not a number. I looked at the properties again and found innerText that had, you guessed it, the text with no HTML. Great, I'll use that. Everything worked great.

Until I switched away from Chrome. There was no innerText. There was no innerHTML.

The cross-browser friendly field turns out to be textContent. I think there's a library call I should have been making that would have grabbed the right property for me. Maybe after 20 years of making websites I should know textContent is the right property to use. But I didn't. Until now.

textContent. That's the ticket.

 


programming/interweb

4 Weeks of Code

07.12.2015

For the better of the last month I've been working on 1 chunk of code at work. Normally work has 2-3 days chunks at best. Why is this such a big chunk? Basically because it took over 2 weeks for me to figure out what the hell I was doing.

Users have the option to create alerts and get notified when a matching deal occurs. Right now they type in a keyword and behind the scenes magic figures out if that keyword maps to a store, a brand, one of our categories, and/or other stuff. It's magic. It's great when it works (and when I've looked at it, it's worked more than it hasn't. When it doesn't work... well, it doesn't.

Along from their came my task. Remake the alert notification. There was a nice little mock up of what all it should have. Fields for category, store, brand, and some other stuff that's pretty straight forward. We've got tools so that if someone starts typing in the name of a store or brand the autocomplete kicks in and shows options. That was all great until i got to the Category.

Who is going to know the way our Categories are set up? My first pass had a list of all the categories and their path, so that if you wanted iPhone cases you would scroll down a list to:
     Electronics > Phones & Cell Phones > Apple iPhones > iPhone Accessories > iPhone Cases
Obviously that wasn't going to work.

The existing autocomplete functionality only matches at the beginning of what's typed. Typing "iPhone" gets no matches because nothing starts with "iPhone" (it's under "Electronics", and then down 4 more levels).

After more miss-starts than I want to count, I saw down with Keith and Matt (seperately) at work and made up something that might work. An old fashioned MicroSoft ComboBox. It's starts out as a drop down list with the top level of categories, and each selection re-populates the list with the next level underneath. Alternately, you can start typing in the field and anything that matches (not just at the beginning of the text) will populate the list. For both, as you select your category a little breadcrumb trail of the path you've made is shown so that you can back out or pick back up in the middle.

It sounded good. I liked the idea. I knew how to make about 20% of it.

The majority of the past 2 weeks has been writing JavaScript. My JavaScript is weak. People can do a whole lot more with JavaScript than I ever imagined. What I've bene writing HAD to be JavaScript due to how the framework is laid out. I started writing things from scratch. That didn't work - there were too many existing conflicts. I tried to hack the existing autocomplete function(s). That didn't work at first because I was trying to do everything at once. After a frustration-thon, I backed up and took baby steps.

Break this down into functional parts with dummy data, then fill it with the right data. That's how I used to make web pages, why did I stop?

From there I took baby steps. Lots and lots of baby steps. I started with the existing autocomplete field and functions, copied them to a new file, and then proceeded to rip everything out piece by piece, which forced me to learn how it worked (read: JavaScript). It took longer than I wanted, but I eventually got what I wanted. I ComboBox you can type in or instead make selections from. A breadcrumb trail of the categories selected is dynamically populated, and you can remove one if you want - and all the sub-categories the removed category are removed too.

I haven't worked on the alert redesign for a month. I've worked on a damn ComboBox for a month. If I knew what I was doing to start with, it should have taken about 3 days. I wish I could chalk it up to the new job learning curve, but I've been there 7 months now, and if I knew the JavaScript that you would think would come along with 20 years of web design I should have grasped what was going on faster. I'm still not finished - there's some cross browser testing to be done, and I'm sure once I open the code up to a second set of eyes some optimization tweaks will come forward. But I'm ready to be done with this one as it's whooped my butt. Hopefully the result will be good enough to make the whooping worthwhile.


programming/interweb

Russellmania 2015 - Finally

06.25.2015

After nearly 3 months of nothing going on, the new and improved Russellmania is now available with less content!

Why less content? The last version of the site had been live for almost 6 years. There was a lot of bloated content. I had made my own content management system. Over the course of those 6 years I both forgot a lot of what was going on in my head when I wrote that code - to the point it was a pain to add anything new - as well as learned better ways to write that old code. The problem there was the code was so twisted about to make the site properly work, I knew trying to tweak anything would probably break the whole site. For the past year I've been meaning to start over. So I did.

Instead of making everything from scratch I based the layout on a responsive template. For once, I'm using a white background - that freaks me out a little. I went back and had to tweak old blog entries to make them layout properly in HTML5. There will still be some weird styling issues with old posts, but everything should be readable. Old links may be broken (well, that's always the case). Internal links to gaming stuff won't work unless it's a Zombie Mall post. I'm not hand-writing HTML in my blog post entries anymore. Instead I'm using an editor that's smarter than I am and converts all of this plain text properly. No more fancy layouts in my blog posts! This also affects the old posts, as the pop up gallery viewer I was using is no more.

Enjoy the new Russellmania. Don't be surprised as little things change as I notice them, probably right after you, the public, get annoyed by something and have a deep desire to bring it to my attention.


programming/interweb

Blog Archive

As always, correct spelling is optional in any blog entry. Keep in mind that any links more than a year old may not be active, especially the ones pointing back to Russellmania (I like to move things around!).

Tags have been added to posts back to 2005. There may be an occasional old blog that gets added to the tag list, but in reality what could be noteworthy from that far back?

Blog Tags

3D Printer (20)
4ground (3)
action figures/toys (10)
Amazon (12)
antenocitisworkshop (11)
belt sander (12)
boardgames (67)
books/comics (19)
computers hate me (1)
conveyances (15)
diet (53)
dreams (5)
game dev (22)
gaming miniatures (106)
gaslands (8)
gastric sleeve (34)
hobbies (67)
mckays (1)
mom (27)
moon light (5)
movies/tv/dvd (55)
ninja division (1)
pilonidal cyst (5)
programming/interweb (40)
rambling (52)
random (328)
random maintenance (3)
reaper chronoscape (13)
renovation/remodelling (20)
road trip (25)
ttcombat (12)
video games (51)
walking dead (13)
wargame foundry (2)
work (2)
wrestling (45)
zombie mall (21)