ashfurrow / blog Goto Github PK
View Code? Open in Web Editor NEWThis is my website, a static site generated with Gatsby.
Home Page: https://ashfurrow.com
License: Other
This is my website, a static site generated with Gatsby.
Home Page: https://ashfurrow.com
License: Other
Problem with rake deploy:feeds
:
rake deploy:feeds
bundle exec s3cmd put --access_key=$SITE_AWS_KEY --secret_key=$SITE_AWS_SECRET --recursive setacl --acl-public –recursive --add-header='Cache-Control:max-age=3600, public' build/*.xml s3://feed.ashfurrow.com/
bundler: command not found: s3cmd
Install missing gem executables with `bundle install`
rake aborted!
Command failed with status (127): [bundle exec s3cmd put --access_key=$SITE_A...]
/home/travis/build/ashfurrow/blog/Rakefile:14:in `block (2 levels) in <top (required)>'
/home/travis/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => deploy:feeds
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [rake deploy:feeds...]
/home/travis/build/ashfurrow/blog/Rakefile:21:in `block (2 levels) in <top (required)>'
/home/travis/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => deploy:all
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [rake deploy:all...]
/home/travis/build/ashfurrow/blog/Rakefile:41:in `block (2 levels) in <top (required)>'
/home/travis/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => deploy:travis
(See full trace by running task with --trace)
s3cmd isn't in the Gemfile. I added it but am having problems installing:
> bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "thor":
In Gemfile:
s3cmd (>= 0) ruby depends on
thor (~> 0.14.6) ruby
middleman-blog (~> 3.5.3) ruby depends on
middleman-core (~> 3.2) ruby depends on
thor (0.19.1)
Need to figure out a resolution.
It looks OK but isn't great – especially the big list of talks with italics text – very difficult to read.
So if you have something in backticks, it's currently pink or something.
I've got an article talking about why I moved. Now I should do a retrospective on what went well, what could be improved, and what I would do differently next time.
Should be a robots.txt or whatever during the automatic deploys to S3.
December 2014 marks the fifth anniversary of my beginnings in iOS development. I'd like to do a post that kind of goes over where I came from as a series of events or a timeline. Mostly a personal post, but maybe there's some lesson or something. Dunno yet.
Found two timeline plugins:
The first is for events while the second is for periods of time. Leaning toward the former.
It's 301'ing to the new feed URL, but that URL is an Atom feed, not RSS, and I suspect it's messing with a few services.
That whole thing could look nicer.
http://fortawesome.github.io/Font-Awesome/icons/
Need icons for:
Hasn't been updated since before I moved from Squarespace. Don't think I need it to be heavily designed at all. Things I'd like to highlight:
I really like this idea, too, and I'd like to highlight it somehow:
I want to become the kind of engineer that I'd want to work with.
Like, a lot.
It looks OK now, but needs some TLC.
Also, add new Artsy stuff that's happened since my last refresh.
While your solution for your example of Swift's inability to have optional methods in non-Objc protocols is certainly clever, to me it seems to blur the responsibilities and roles of each component (of course, this is just my opinion, so take everything I say with a Swift grain of salt).
In your example, I view the Food objects as nothing more than pure model objects: they have properties, but don't really "do" anything themselves; their sole purpose is to provide the Consumer with information so the Consumer can then perform the needed functionality. However, by placing the responsibility on the Food objects to update the state of the Consumer, it blurs the lines between the two: is Consumer a pure model object? Is Food? Or are none of them pure model objects? Further more, what if you decided later to change the properties of the Consumer? You would then have to reflect this in all your Food implementations, which as we all know should be a warning sign that there should be some refactoring involved. Plus, this can then be seen as a tight-coupling of sorts; sure, you're using protocols, but if you have to change your implementation of how the Food objects "get eaten" every time you change the Consumer protocol, you lose a lot of the benefits of loose-coupling in the first place.
This, of course, is only an issue to me because it doesn't reflect my viewpoint of how things work in the "real world", which I try my best to represent in my code, since it makes the entire structure "feel" natural (but that is entirely up for debate). Should the components be changed to something else like a standardized test answer sheet and an answer sheet reader, to me it seems even more awkward. An answer sheet contains nothing but answers filled in by students; it doesn't do anything since it's essentially pure data. It should be entirely the responsibility of the answer sheet reader to a) read the input answer sheet, b) convert that into usable information, and then c) update its state (and the student's grade). Using your example would instead give the responsibility of updating the student's grade to the answer sheet itself, which breaks my preconceived notions of what is "smart" in this situation and what is "dumb".
Since I've spent a bit of time arguing why your solution feels "wrong", I should probably put in my own $0.02 over what I would do. Personally, I would just use the same solution you came to in your post, multiple protocols: a protocol for caloriesPerGram, and a protocol for milliLitersWaterPerGram. (Actually, my first choice would be to make both caloriesPerGram and milliLitersWaterPerGram return an optional value and have all Food instances implement them, since it also allows for food that doesn't have calories or water, but you didn't seem to like that idea).
tl;dr: I agree with your solution of using multiple protocols to solve Swift's lack of optional protocol methods, but I don't know why you didn't use the same solution for your Consumer-Food example. The solution you ended up using seemed more inelegant to me, because it mixed responsibilities of objects involved (resulting in a somewhat tight-coupling after all, to me at least), as well as didn't fit in with my view of how the world works (Food should be pure data IMO). However, this is all opinion, and the truth is the actual code is in fact clever and works, so don't let one person's opinion over it deter you from implementing something similar in production :D
Currently you need to use an img
tag with an explicit class. Could be fixed using CSS, too.
Someone submits a dupe issue on your GitHub repo. What is more likely:
And we yell at them. Or, at least, we are neutral over text, which is the same effect of yelling at them.
And we wonder why tech is vitriolic.
The static.ashfurrow.com
is an S3 bucket that sits behind CloudFront. I decided not to use CloudFront because in case an edit is necessary, I don't want to have to wait for caches to invalidate. However, for things like static header images, I think CloudFront would be a good choice. Specifically, they won't change very often (if ever), and are the largest asset downloaded when you land on the site. Making them appear faster will make the entire site appear to load faster.
Talk to @chriseidhof about how he does this.
Something's fishy: https://twitter.com/jkubicek/status/524969310465191936
http://ashfurrow.com/blog/2012/03/why-objective-c-is-hard/ should redirect to http://ashfurrow.com/blog/why-objective-c-is-hard-to-learn for example, but isn't.
Similar to github readmes / the CP guides
Would have sub-linked to something directly had it been available. All you have to do is add an id to the titles and the browser can handle the jumping, its nice to add a low-vis negative-margin'd hash or something.
Example: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fashfurrow.com%2Fblog%2Fthe-complexity-of-evil%2F returns "The Complexity of Evil - Ash Furrow" for og:title
.
Still four months early, but I like this:
<a href="http://m.maploco.com/visited-europe/mine.php?euro=AT-BE-BY-CH-DE-DK-ES-FR-GB-IS-IT-NL-PL-RU"><img src="http://map1.maploco.com/visited-europe/ml/AT-BE-BY-CH-DE-DK-ES-FR-GB-IS-IT-NL-PL-RU.gif" border=0 /></a>
I gave a talk at dotSwift called "Production Swift" (and I'm giving a similar, more in-depth talk in Istanbul soon). The dotSwift video will be online in a while – it could be nice to have some more details to post with the video when it's up.
Some material that came up since I gave the talk (could be useful for the expanded talk, too):
It's on S3 right now – originally I was concerned with cache invalidations slowing down my process, but I'm OK with waiting for travis to build, so it should be fine.
Seen on http://ashfurrow.com/blog/sharing-is-selfish/ on desktop safari
They're just <a href>
– weird.
It should include the <!-- more -->
summary separator, which is mandatory.
So if it's an image on 500px or flickr or Instagram, there should be a link to go to it on that site.
I have a lot of blog posts, etc, and it would be awesome if I could easily link to things people can buy from me. Not in, like, a creepy or invasive way. But posts like this where the author has written an interesting post and links to relevant stuff they've also done that you can buy.
Ideally, this could be in the page header with the title and background image and everything. Something like:
---
title: Some awesome blog post
link_to: swift
---
So this blog post blah blah blah ...
And then at the bottom of the post, after the post content but before the next/prev buttons, there'd be some kind of partial inserted that Switches on the link_to
string to link to one of my books.
Two main points:
Closing sentiment:
If you're an artist, you're too busy making things to worry about what gear you or anyone else uses. If you're a professional, you're too busy making money from the new business that technology enables to worry about the old industry that technology obsoletes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.