“I think I should warn you all, when a vampire bites it, it’s never a pretty sight. No two bloodsuckers go the same way. Some yell and scream, some go quietly, some explode, some implode, but all will try to take you with them.“
This is just….the BEST
and an orbital lance is addressed “occupant”
New PBF comic for @playboy (http://pbfcomics.com/comics/shocked/)
*Wil Wheaton and some of his pals created an artisanal beer that describes itself as “an anthology of beer science fiction.” I bought one and drank it. As expensive fancy beers go, it was pretty good beer
Jesus Christ
Yknow they say beer causes hormonal imbalances in men. I can believe this one would.
Hulk has made the same point about Scorcese’s work, and I think it’s a very powerful statement.
The moon: pretty stupid.
Doug Stanhope (via iamdougstanhope)
A nice bit of refactoring
Just wanted to share a little success story. I spent a couple hours during my final project trying to refactor a lengthy if/else statement. I spent another couple hours last week, once the project was over, going back to it and trying to fix this method, but still not getting anywhere with it. But I went back to it again yesterday and finally cracked it.
It's actually a very simple solution, and I'm not certain why it took me so long to get to it. I think in large part it was a matter of being like... a bit intimidated by the language, I guess? I knew how to do what I wanted in Ruby, but I'd hit so many roadblocks where Swift didn't work like I expected, I didn't think I really understood how "for" loops work... except they work pretty much like you'd expect them to, so... what was my problem? I'm not sure.
So I went from this:
Where updateFoodMenuBar( ) acts as a manager, choosing what arguments to pass to the fillIceCreamArray( ) renderer, to this:
So, to break it down quite simply: this is for a virtual pet, and we have a bar on the screen that indicates hunger for that pet. If it is silhouettes of ice creams, the cat is hungry:
As you feed it, it populates that bar with a coloured in ice cream:
In terms of code, there is a StomachContents array inside the Cat class. When you feed the cat, it inserts an element into that array. The Controller looks at that, counts the contents, and renders that many ice creams on the screen.
The way it was working before was to go "Ok... IF there is X number of StomachContents, then I will render THIS *very specific* set of images".
And I just changed it to two arrays - an Array of the Image *elements* and an Arrya of the actual Image *files* that would be rendered inside those elements. And then just iterated over the former, inserting the latter into it, up to the range of the StomachContents
The only thing I don't like is that it re-renders every time. Well, I don't think anything really happens that's *visible* to a human, but... it is going over elements that have already be rendered properly, every time it gets called... so I might change it to an associative array, so that it only renders things that don't have, like... whatever Value associated with them
Taylor and I are announcing the official end of Every Frame a Painting. Nothing sinister; we just wanted it to end rather than have it continue as some weird zombie version of itself. The existing videos will, of course, stay online. Just nothing new, that’s all.
medium.com/@tonyszhou/postmortem-1b338537fabc The above link is to a Medium post that includes the script to our final unmade video. Anyways, thank you all for watching and supporting all these years. It’s been a blast.
The hero we need.