This blog is long since retired. I’ll keep it up here as a record and resource, but any new posts will be on https://bit-101.com/blog
If you want the blog that existed here from 2017 to 2013, you can find that here: https://bit-101.com/2017
This blog is long since retired. I’ll keep it up here as a record and resource, but any new posts will be on https://bit-101.com/blog
If you want the blog that existed here from 2017 to 2013, you can find that here: https://bit-101.com/2017
I don’t want this to be a rant, but I feel like I need to document this experience. I’ll try to stick to the facts.
TLDR; hardware issues, poor support.
The Good
It was just about a year ago that I got a Dell XPS 13 9360 Developer Edition. This laptop is designed to run Linux well and comes with Dell’s own version of Ubuntu with updated hardware drivers. They also push any changes they make upstream, which is nice. I’d read that Linus Torvalds uses one of the Dell XPS machines. He prefers a desktop, but if he’s on the road, he uses a Dell.
Design-wise, the laptop is pretty nice looking. It’s thin. It’s light. It’s attractive. Virtually no bezel – it’s all screen. Much smaller footprint than my Yoga 2 Pro, but the exact same screen real estate. The keyboard is standard chicklet that you get on pretty much every laptop these days. Nothing to write home about, but not horrible (except for the space bar, which I’ll get to shortly). Track pad is decent enough. Sound is fine for a laptop. It’s got 2 full size USB ports and a USB C. No complaints about the battery. The screen itself is nice, though a bit too high res for me. 3200×1800, again same as the Yoga. As this resolution generally causes more problems than it’s worth to my eyes, I usually set it to 1600×900, which works just fine and looks good enough to me. The palm rest is carbon fiber, which is pretty cool. Intel Graphics are meh, but it’s not a gaming machine, so that’s fine.
The Bad
So let’s start on the problems. The first thing I noticed was the aforementioned space bar. It had two issues. One, when I tapped it with my left thumb, it often would not register anything. And two, it would constantly add multiple spaces as I typed. I guess this might have been happening with my right thumb. This was a well known and documented issue. There are articles and Youtube videos explaining exactly why it happens and how to fix it. Unfortunately, these involve taking the computer apart, which I wasn’t going to do to my brand new still-under-warranty device. I decided to try and live with it, but it was pretty damn annoying having to constantly correct myself.
The next thing I noticed was a physical defect on the palm rest. I first noticed it as a small bump and when I rubbed it, the bump came off revealing a small pit in the palm rest. At first I thought maybe this was something I had done. But I wasn’t using anything near that computer that I believe could eat its way into carbon fiber. Still, I wasn’t 100% sure I hadn’t caused it somehow and it was pretty tiny, so I decided to try and live with that too.
Other than those two things, the computer seemed fine for many months. Then in July of this year – about 9-10 months into owning it, the display started going weird. It was just black, even on a new boot. Obvious first thought is some kind of video driver issue. Especially being on Linux, these things can crop up. Oddly, it worked fine on an external monitor. So I wasn’t really sure if it was a hardware issue or driver or what. It happened several times just before I went out of the country on vacation, so I decided to take my Yoga with me instead and deal with the Dell when I got back – reinstall Linux and if that didn’t fix it, I still had a couple of months of warranty left to get it fixed. But when I got back home, it was working fine. And never had the display issue again.
Then, one day a few weeks back, I went to reboot it, and it could not find any bootable media. I’m no stranger to UEFI/BIOS stuff, but nothing I did could get it to boot. No big deal, I thought, I’ll just reinstall Linux. But the machine could not even recognize a bootable USB drive. Note that I had already installed a few versions of Linux in the time I’d had the computer – just because I like to try different distros now and then. All through bootable USB drives, so I kind of know what I’m doing here. Time to call in the warranty.
Initially, Dell support was very helpful. They did due diligence to rule out user error, and then sent me a box to mail the pc in for repairs. While I was at it, I mentioned the space bar and display issues I’d been having. Up to this point, I was totally fine with how things were going. Computers have hardware issues. This is why we have warranties. I sent it in and expected things would get resolved.
The Ugly
After a couple of days, I got an email saying that there was evidence of spillage in the computer and this was not covered by the warranty. I would have to pay around $250 for repairs. Now, I knew, absolutely that I had not spilled any liquid into the computer. I suspect they might have been referring to the pitted spot on the palm rest. But this was one tiny spot right in the very center of the left palm rest, as far as you could get from any opening on the keyboard. Even if this was something I had caused, it was not the cause of the hard drive controller failure. I asked what the exact evidence of spillage was that they had found. The tech said that he would request photos of said evidence and send them to me.
That’s the last I heard about spillage. The next email was from a different tech saying that they had replaced the logic board and other components and they needed to reinstall the OS and needed my OK to do so, as it would wipe out anything I had on the hard drive. I said that was fine, I had backups. The next day I was told the repairs were done and the pc was on its way back to me.
This whole exchange seemed pretty sketchy to me. Like, “Let’s try to get the customer to pay… Nope, they didn’t fall for it, just fix the computer.” I never even argued about the spillage. I just asked for details and it disappeared.
The Uglier
So the computer arrived back. I cheerfully unboxed it, plugged in the power and pressed the power button. And… it could not find any bootable media. And it could not find a bootable USB drive. In fact, the behavior it was showing was identical to the behavior I sent it in with. A letter in the box said what they had supposedly done: replaced the hard drive, lcd panel, palmrest, keyboard, main logic board. And my earlier conversation with a tech had indicated that they had reinstalled the OS. In fact, the computer came back with a card containing a Windows license number.
I could not understand how they could replace that much hardware and the computer behaves no differently. I could not understand how they could have installed an operating system on a computer that would not boot. I could not understand why they would ask my permission to reinstall an OS over my existing hard drive but also replaced the hard drive. I could not understand how they replaced the palm rest and the palm rest had the exact same pitted spot that my old palm rest had.
The only things that made sense to me is that someone there was very confused or someone there was outright lying. I don’t think they did anything other than clean up my computer and send it back.
So, back in touch with tech support. They had me try various BIOS settings and repair images, but nothing could get the thing to boot or see a USB drive. In fact, I talked to different techs and they had given me totally conflicting instructions on BIOS settings. But I tried everything anyway. Finally, they said they were going to send someone to my house to replace the motherboard. At this point, I was fed up and said this was unacceptable. Either send me a new computer, or give me my money back.
The End
To my surprise, they responded right away saying they were sending a new computer. And it arrived. And… so far, it’s pretty good. It boots, no screen problems, no palm rest defects, and the space bar seems to work just fine. So, it all turned out well. But the whole experience left me with a bad feeling about Dell tech support.
To reiterate – hardware can have flaws. You produce millions of computers, you’re going to get the occasional dud. That’s not going to upset me as long as the company takes care of it. Sadly, the tech support experience left me with the feeling that they are either utterly incompetent, dishonest, or both. In spite of it being a nice computer, this experience has me doubting that I would buy another Dell product again.
So… that went pretty well. One full month of posts done. I wasn’t sure how long I’d last before we started seeing gaps in the lineup. But this is easier than I was expecting. Turns out, I have a lot of ideas. To be honest, and to possibly spoil some illusion, I’m actually a bit ahead of the game. Some days I have more than one idea, or I come up with one or two iterations to something I just did. If so, I just go ahead and bang out whatever is in my mind and postdate it. This also takes the stress off having to come up with something brand new every single day. While generally not a problem, some days I might be really busy, or exhausted, or even sick. Having a buffer on those days is really helpful.
My biggest realization on this whole exercise is how many cool sketches I’ve been able to come up with and how easy it is in general. There are various pieces of advice, exercises, motivational sayings, etc. that say if you force yourself do do something every day for so many days… something magical will happen. Or something. For all the new-age, pop-psychology, “one weird trick” dubiousness of those things, there does seem to be something there.
Although it feels like creativity should be something that needs to flow naturally from some unseen source, it can very definitely be forced, or at least jump started. Force yourself to create something every day and suddenly you’ll have more ideas than you can document, much less act on.
To be fair, some of these ideas are revisitations of things I did years ago in the Flash-based lab. But I think I’m taking them in new and interesting directions, and probably have a better presentation of them as well. Even so, all that stuff was at more than 11 years ago. Some of it going on 16 years ago. There may be new viewers who were not even born when some of this came out originally.
A lot of the things I’m exploring is stuff I originally posted on Art From Code. The source for that stuff was never released. And in fact, most of it is long gone. So I find myself reverse engineering my own past work in a lot of cases. “How the HELL did I do that???” One was baffling me for many days, till I finally dug up a source file hidden away in DropBox. Sad that it had to go that way, but happy I found it.
I’ve also done a lot of work on the site interface as well. I got it pretty near where I want it at this point, though there are a few improvements that need to be added. And it will still evolve over time. But I was really happy with the tags searching, thumbnail index, the sorting and sizing of thumbnails, the saving of preferences and the history / clear history feature in the calendar. Most of that is way beyond what I originally had planned on day one. A lot of it still needs to be cleaned up, but I’m happy with the functionality anyway.
I also did a lot of work on the daily page templates. Initially, as I changed some aspect of how it worked, I’d have to go through all of the previous days and edit them all to keep the past days in line. Now, most of the daily UI – beyond the experiment code itself – is done via a UI script. So when I want to change how the daily UI looks, I just change the script and all the days update when they load. That saved me hours already. I toyed with the idea of having a single index that gets a query param of the date it needs to load. That could work, but I’m sticking with individual HTML files for each experiment. This allows me to load individual libraries for one experiment, such as Perlin noise or something else, without having to use some kind of module loader. Or I can make some one off changes or customization to a single day’s experiment, without jumping through hoops.
One last aspect I wanted to mention. This goes back to the creativity aspect. A few years back I did a talk at a few conferences, which I think was also entitled “Art from Code”. In it, I went a bit into left-brain / right-brain theory. I mentioned that while there is a biological basis for the left/right stuff, new age pop psychology has taken the whole theory way beyond reality. However, I did acknowledge that there are different modes of coding, some of them conducive to creativity, some less so.
For example, say you have some creative idea and an concept of how you want to code it. You open up an editor and… create an HTML file, give it a name, figure out where to save it on your disk, give it a head, title, body, import some libraries, add a canvas to the stage, maybe some CSS, add the main JavaScript file to the HTML, create that file, get a reference to the canvas, get the context… now, what was that idea you had? It’s probably gone.
Basically all that analytical, naming, organizing, structuring activity pulls you right out of the cool idea mode you were in. Blame it on brain hemispheres, or don’t. It happens. This is perhaps one reason why the Processing language is so popular among creative coders. You launch processing, you start typing, you hit “run”. BAM!
So part of my flow is a templating system and some creation scripts, as well as the various libraries I’m using. Say I have an idea for something I want to publish on June 12 (no, I’m not that far ahead of myself yet). I just type in the console:
mkdaily.sh 170612
and the HTML and JavaScript files are created and ready to start typing code into. I’ve been using JetBrain’s WebStorm, which has a built in terminal window, so it’s always ready. Say I like what I did on the 12th and I want to iterate it a bit on the 13th. Rather than copy the two files and manually edit them, I type
cpdaily.sh 170612 170613
and it copies the original experiment into the new one, changing the date, links, etc. I just need to iterate the code, update the description, etc. Both of these scripts, as well as the templates, are there in the repo if you want to get a better idea how that works. And yeah, they guard against overwriting existing files if I type in the wrong input. Anyway, all that has been hugely useful in keeping me in creative mode, and away from housekeeping and setup work when I have a good idea.
In summary, I’m on a roll and don’t seem to be slowing down. I’m certain I’ll bat 1000 again for February. Then we’ll see how March goes.
So I think I found a pretty good system for allowing people to comment on stuff in the lab. Commenter Erik pointed me to this post:
http://ivanzuzak.info/2011/02/18/github-hosted-comments-for-github-hosted-blogs.html
TL;DR – Create a github issue for each sketch. Link to that from the sketch. People can comment on the issue. Brilliantly simple. I made the system a bit simpler than described in that article. I’m not pulling in the comments to the sketch page, just linking to it.
I actually had set up Disqus to open up in a overlay div. It worked fine, but I wasn’t super happy with it. It was like, the site is here, the content is here, the source code is here, and the comments are … way over here on this other unrelated site.
With the github solution, the site is here, the content is here, the source code is here and right along in the same package are the comments.
It’s a bit more work for me. I have to create the sketch, then create the issue, add the sketch url to the issue, and add the issue url to the sketch. The template I have for sketches handles most of the boilerplate because everything is indexed to the sketch date in the format YYMMDD. But the issue url will be sequentially numbered, so the issue will need to be created and then the url added to the sketch html. Not a big deal. But the Disqus method was 100% automated. 🙂
Anyway, hopefully this will allow a decent way for people to comment, discuss, ask questions, etc.
One of the key aspects of the lab has always been that it’s open source. The code is not particularly written in a manner conducive to education. It’s often the result of me hacking around until I find something that looks good. At that point, it’s done. No heavy duty refactoring, cleaning up, commenting. You get what is there, and if you can figure out what I’m doing, great. If not, feel free to ask, and maybe I’ll try to explain. Maybe not. I might have forgotten what the code does myself.
Anyway. I was looking at the flow. You see something in the lab you like, you have to take note of its number, somehow navigate to the github site, go into the dailies directory and find the js file with that number. Or, maybe you’ve cloned the repo. You can pull any updates and navigate to that spot on your file system.
But hey, that source file just lives at a standard url right? Why not give the nice viewers a link to click on? So there you go. Right up in the description box, there’s a “source” link that’ll take you right to where the code for that particular experiment lives.
I’m also trying to figure out a way to enable comments or discussions. Ideas I’ve had so far:
1. Disqus. I got it working easily enough, but the UI is not going to work out. I want each experiment to be full screen with only the home link and info box. I could make an additional link or button that opens up the Disqus UI in some kind of popup, but I wasn’t really liking where that was going.
2. A forum. That’s a possibility, but kind of a heavyweight one. I’ve run forums before. Not sure I really want to get back into that. And forcing people to make forum accounts and profiles, etc. Not into it.
3. Github wiki. I’m just not familiar with that. Could work out. One wiki page per experiment. Open to anyone editing. Open to abuse, I guess. Anyone have any experience with this?
Any other suggestions? I think a github-based solution would be great. Surprisingly there’s no straight up comment feature in github that I can see. There are issues and pull requests, sure. But is there something where you can just comment on a file or folder?
I just ticked off another feature on the BIT-101 Lab list. A visual index.
Back in the old Flash Lab the only way to find a specific experiment you wanted to look at again was to click through, one by one, trying to remember the approximate date and targeting items around that. I wanted to avoid that pain. The first thing I did was to add tags and the ability to search by tags. This should help a lot. But I think this visual index will help even more. You can just scroll until you see something that looks like the thing you want to check out, and click away. It will also be good for discovery, I think.
At any rate, I think it looks pretty cool. I test-populated it with about 15 future experiments and it really starts to look great when there are lots of images in the list. I can’t wait to see it grow.
This weekend I was in a book store (remember those) and ran across this book – Beautiful Geometry.
A few minutes of looking at it, and I was on my way to the register to buy it.
Each chapter takes on a specific, interesting mathematical / geometric principle and takes a couple of pages to explore it. There’s a bit of history, some formulas, some images and diagrams and some practical uses.
The very first chapter, on Thales’ Theorem gave me an immediate realization on how I could solve a problem from Euclidea. Actually I had solved that problem, but had no clue how. Seeing and understanding Thales’ Theorem gave me instant understanding of how to solve the problem. I opened the app and solved it without a hitch.
I’ve gone through a few other chapters. Great stuff. I’ve worked a couple into future experiments in the BIT-101 Lab. I’m sure this book will fuel several more pieces there.
Note, this is NOT a coding book. There isn’t even really more than a passing reference to computers here. But it explains the concepts and formulas well, so you shouldn’t have much trouble applying the concepts to code.
Available on Amazon here: Beautiful Geometry
I got the hardcover, as that’s what was in the store and once I picked it up, I had to take it home. But you could get it much cheaper as a paperback or Kindle version.
I’m a math nerd. I’ve actually never had any real professional math training. I just like studying mathematical concepts and figuring out formulas. In particular, I like any math that can be graphically visualized. If it can be animated, all the better. Computers and math and graphics and animation – that’s the stuff right there. If you’re in the UK, :s/math/maths/g
Recently I ran across an Android app called Euclidea. And soon discovered that while naturally there is an iOS app, there is also a web site that has all the same content.
Basically, there are 120 problems, or levels. In each level you need to construct some geometric form, place a point or line or form an angle that fulfills some criteria. The initial tools you have are a straight edge and a compass. As you figure out different techniques, those get added as shortcut tools. For example, using only a compass and a straight edge, you can form a line that bisects a given line segment. When you figure that out, you are given the perpendicular bisector tool that does that in a single step.
While simply solving a given level is OK, there are also goals to meet, such as solving it in a minimum number of steps. It gets a bit complex, but each problem has an L-score and an E-score. E is the number of Euclidean constructions. This would be a line drawn with the straight edge or a circle drawn with the compass. L is the number of “lines” drawn using any of the complex tools you discover. For example, using the perpendicular bisector tool would count as one L as you use that tool one time. But it counts as three Es, as it takes drawing two circles and a line.
Some of the problems – even on the higher levels – are fairly easy and straightforward. A few had me completely stumped and I had to resort to searching for an answer. Most of them I can solve, often within the L goal, but usually have a much harder time with the E goal. There’s even an active Quora community dedicated to the best solutions to the various problems. Fun stuff.
The Android app is free, but you have to solve a certain number of problems on lower levels with the correct L and E scores to unlock later levels. Or just pay to unlock everything. I paid.
TL;DR: Go here: https://bit101.github.io/lab/
Long time readers of this blog may recall what existed here before “blogging” was a thing – the BIT-101 Lab.
Back in the late 90’s / early 2000’s there were a bunch of people running Flash “experiment” sites. Basically, each day they would post some kind of visual, animated and/or interactive Flash piece, often open sourced. Josh Davis’s Praystation, Jared Tarbell’s Levitated, Robert Hodgin’s Flight 404 were some of my favorites. In August 2001 I decided to blatantly copy them… I mean… jump on that bandwagon. My site at the time was called “KP Web Design”. Sigh. I started doing some experiments and decided I needed a better domain, so I came up with bit-101 and moved all the experimental stuff over there. It went live on September 11, 2001. Yes, THAT September 11th. So nobody really noticed it for a while. But over the next four years I posted just shy of 700 open source Flash experiments that explored all kinds of neat techniques. The site won an award (FlashForward 2003 – Best Experimental Site) and really pretty much launched my career.
In 2003 I started this blog. And by 2005 the lab was retired. I blogged heavily for several years, but in the last few years, not so much. I’ve had other interesting projects over the years, but nothing was quite as exciting as those lab days. Recently Zach Lieberman posted about his 2016 project of posting a sketch each day (sketch/experiment, same concept). It inspired me to get back to basics.
Of course, I would not be doing Flash anymore. I haven’t opened that program on my own volition in several years. (I did need to use it to examine or fix a few things for work a few times.) My weapon of choice these days is HTML5 Canvas and JavaScript.
I’ve spent the last week or so creating a site and a workflow. All the source will be posted on github at https://github.com/bit101/lab. And the site uses github pages – https://bit101.github.io/lab/. So literally, the site IS the source IS the site.
I have template files and a script to create a new daily sketch / experiment based on the templates. This goes into a dev folder where I can work on it. When I’m ready to release it, I move it to the dailies folder, update the index.json file, add, commit and push. This updates the source and publishes the new file to the site. Because the site IS the source… etc.
One thing you’ll see in there is the use of a couple of libraries, bitlib and QuickSettings. You might be familiar with the latter. But the bitlib library is something I’ve been working on quietly for a while. It’s really just for my own use. It’s not something that I want to promote and convince other people to use and then have to wind up supporting. It’s just a compilation of the functions that I wind up using over and over. It’ll grow and change over time. Feel free to use it as much as you want – at your own risk. I make no claims for it’s production-readiness.
The site code is pretty rough. Again, I banged it all out over the last week in my spare time. But I’m quite proud of the calendar UI I created from scratch. And the tag searching and indexing. It’s even responsive and stuff. I have plans to take a screen shot of each experiment and present a visual index as well. And I’m thinking about ways to automate that index / tag generation portion. But it all seems pretty good right now for starters.
Anyway, I’m pretty excited about this. I know that on day one, there’s not a whole lot to be excited about from your end, but hopefully as the calendar fills up, it will become a fun place to visit and play with and learn from.
I just pushed QuickSettings Version 3: https://github.com/bit101/quicksettings/releases/tag/3.0
I’m really happy with the changes in this version. I use QuickSettings myself all the time, so most of the changes stem very much from personal experience – seeing my own pain points and addressing them. The key motivation for changes in this release was making the library easier to use.
One of the annoyances I noticed was in getting values from a panel – you had to know what kind of control you were querying and use the correct get method, i.e. getRangeValue(title)
or getColor(title)
or getText(title)
. And the same for setting values. Since the panel knows what kind of control it is setting or getting via the title, there was no reason to force the user to specify it. So all that is gone. All controls can be set or get with setValue(title, value)
and getValue(title)
.
Since all controls now used the same interface for getting and setting values, this allowed me to vastly simplify the getValuesAsJSON
method, returning an object or JSON string of all the values in a panel. It also allowed me to easily create a corresponding setValuesFromJSON
method. Since both of these methods utilize the same JSON format, you can grab the values at one point and reset the panel using that same object. The Reset Demo (source) shows one example of how to use that. You could also use this technique to create multiple presets for panels.
Having a single format to get and set all panel values opened up a solution for another situation that annoyed me. In working on some experimental piece, I’d create a panel, and adjust various values in it, and then need to change the code. When I re-ran the application, the panel was of course back to its original state. And I’d have to go adjust the values again. The solution is saveInLocalStorage(name)
. When you call this method on a panel, it immediately looks for an item in localStorage with the given name. If it finds one, it uses setValuesFromJSON
to reset the panel to the values found there. It then listens for any changes that occur to any values in the panel and immediately saves them to local storage under the same name. This means that the next time you start the app, the panel will initialize with the same values it ended with in the last session. Check the Local Storage Demo (source) to see this in actions.
I’ve also been paying a lot of attention to the size of the library, trying to keep it as small as possible. This includes removing any code that is not vital to the project. So there were some removals in 3.0:
I noticed a while ago that setInfo
and setHTML
were almost exact duplicate methods. So I just made setInfo
into an alias for setHTML
. In version 3.0, setInfo
is gone altogether.
A big removal was the parse
method. This would take a JSON object and generate an entire panel from it. The idea being that you could build a panel declaratively with JSON rather than writing JavaScript code. I personally wound up never using this method and never heard from anyone who did. It was complex and took up a big chunk of the source code. So it is gone. If people really miss it, I’ll consider recreating it as a separate module.
Finally, I removed the whole snap-to-grid functionality. I found, personally, that I wasn’t moving panels around that often anyway, and when I did, I didn’t really care if they snapped to any kind of grid. It was a neat feature, but not essential.
Between the simplification resulting from the new get/set methods and the removal of the items mentioned, I was able to cut about 4k off the library size, making the minimized library about 20.5k.
Of course, these changes may break some existing apps. Hopefully not too badly. And I think the added simplicity and functionality is worth it.
One thing not as visible is that I’ve also started unit testing the library. This was long overdue. When I started changing the set/get methods, I saw that I was going to need to do a ton of manual testing on each and every control to make sure that I wasn’t breaking anything. Forget that. It’s all automated now. All the set and get methods are thoroughly and automatically tested now. In addition to making sure that the new functionality worked correctly, this testing also unearthed several pre-existing issues that I probably never would have noticed. Those are now fixed too. All the tests are checked into the repo, so if anyone wants to add additional tests in there, I’ll happily pull them in. I mainly concentrated on the value functions, but there’s a lot more in the library that needs to be added to testing.