43°F

Aaron Parecki

  • Articles
  • Notes
  • Photos

#development

  • Jeremy Keith https://adactio.com/

    The Web We’ve Made

    November 17th, 2019

    Let us not overlook the fact that a semantic HTML web site is inherently accessible by default. When we bend the web to our will, we break that. So we have a responsibility to correct it. Sure the new technologies are neat, but the end result is usually garbage. This all requires some next-level narcissism that our goals and priorities as developers are far more important than that of the audience we’re theoretically building software to serve.

    Singapore, Singapore • 87°F
    #performance #accessibility #tracking #surveillance #ethics #priorities #javascript #frontend #development
    Sun, Nov 17, 2019 10:38pm +00:00 (liked on Mon, Nov 18, 2019 6:15pm +08:00)
  • Jeremy Keith https://adactio.com/

    A Modern CSS Reset - Andy Bell

    October 3rd, 2019

    Some very smart ideas in here for resetting default browser styles, like only resetting lists that have classes applied to them:

    ul[class],
    ol[class] {
      padding: 0;
    }
    

    I select only lists that do have a class attribute because if a plain ol’ <ul> or <ol> gets used, I want it to look like a list. A lot of resets, including my previous ones, aggressively remove that.

    United Flight 906 FRA to ORD • 54°F
    #css #resets #normalise #browsers #defaults #styles #styling #classes #lists #html #elements #frontend #development
    Thu, Oct 3, 2019 11:46am +00:00 (liked on Thu, Oct 3, 2019 2:01pm +01:00)
  • Jeremy Keith https://adactio.com/

    Simplicity (II)

    September 10th, 2019

    When you ever had to fix just a few lines of CSS and it took two hours to get an ancient version of Gulp up and running, you know what I’m talking about.

    I feel seen.

    When everything works, it feels like magic. When something breaks, it’s hell.

    I concur with Bastian’s advice:

    I have a simple rule of thumb when it comes to programming:

    less code === less potential issues

    And this observation rings very true:

    This dependency hell is also the reason why old projects are almost like sealed capsules. You can hardly let a project lie around for more than a year, because afterwards it’s probably broken.

    Tulsa, Oklahoma • 78°F
    #simplicity #process #code #coding #dependencies #workflow #frontend #development
    Tue, Sep 10, 2019 12:38pm +00:00 (liked on Tue, Sep 10, 2019 9:08am -05:00)
  • Jeremy Keith https://adactio.com/

    Fresher service workers, by default

    June 5th, 2018

    “Ah, this is good news!”, I thought, reading this update about how service worker scripts won’t be cached.

    And that was the moment when I realised what an utter nerd I had become.

    Phoenix, Arizona • 91°F
    #serviceworkers #caching #cache #fresh #scripts #browsers #frontend #development
    Tue, Jun 5, 2018 4:36pm +00:00 (liked on Tue, Jun 5, 2018 10:33am -07:00)
  • Jeremy Keith https://adactio.com/

    Cancelling Requests with Abortable Fetch

    April 20th, 2018

    This is a really good use-case for cancelling fetch requests: making API calls while autocompleting in search.

    San Francisco, California • 60°F
    #fetch #cancelling #abortable #requests #api #javascript #code #autocomplete #frontend #development #ajax
    Fri, Apr 20, 2018 1:21pm +00:00 (liked on Fri, Apr 20, 2018 5:38pm -07:00)
  • Jeremy Keith https://adactio.com/

    CodePen - Instagram.exe

    March 4th, 2018

    I’m not sure why but I genuinely love this Windows 95 style interface for Instagram coded up by Gabrielle Wee.

    Portland, Oregon • 40°F
    #codepen #instagram #windows95 #interface #nineties #retro #design #frontend #development
    Sun, Mar 4, 2018 2:51pm +00:00 (liked on Sun, Mar 4, 2018 9:25am -08:00)
  • Jeremy Keith https://adactio.com/

    Your Interactive Makes Me Sick - Features - Source: An OpenNews project

    March 1st, 2018

    Browsers have had consistent scrolling behavior for years, even across vendors and platforms. There’s an established set of physics, and if you muck with the physics, you can assume you’re making some people sick.

    Guidelines to consider before adding swooshy parallax effects:

    1. Respect the Physics
    2. Remember that We Call Them “Readers”
    3. Ask for Consent

    Given all the work that goes into a powerful piece of journalism—research, interviews, writing, fact-checking, editing, design, coding, testing—is it really in our best interests to end up with a finished product that some people literally can’t bear to scroll through?

    Oakland, California • 50°F
    #scrolling #motion #sickness #interaction #interactivity #design #parallax #effects #browsers #articles #animation #movement #health #interactive #frontend #development #nausea
    Thu, Mar 1, 2018 6:04pm +00:00 (liked on Thu, Mar 1, 2018 11:08am -08:00)
  • Jeremy Keith https://adactio.com/

    On AMP for Email by Jason Rodriguez

    February 24th, 2018

    Philosophically, I’m completely against Google’s AMP project and AMP for Email, too. I will always side with the open web and the standards that power it, and AMP is actively working against both. I’m all-in on a faster web for everyone, but I just can’t get behind Google’s self-serving method for providing that faster web.

    Portland, Oregon • 41°F
    #google #amp #email #proprietary #standards #format #gmail #html #frontend #development #monopoly
    Sat, Feb 24, 2018 4:47pm +00:00 (liked on Sat, Feb 24, 2018 9:52am -08:00)
  • Keep a Changelog (keepachangelog.com)
    Portland, Oregon • 49°F
    #changelog #development
    Wed, Jan 17, 2018 8:25am -08:00
  • React Is A Terrible Idea (www.pandastrike.com)
    "Basically, both Google and Facebook are desperate to find a baseball cap that they can put on backwards. Angular is Google's baseball cap. React is Facebook's."
    Portland, Oregon
    #react #web #development
    Fri, Jul 15, 2016 9:40am -07:00
  • Why I No Longer Use MVC Frameworks (www.infoq.com)
    "I can assure you that you are infinitely better off writing code than metadata, be it as a template or a complex query language like GraphQL."
    Portland, Oregon
    #javascript #html #development
    Mon, Feb 15, 2016 10:47am -08:00
  • Using Dnsmasq for local development on OS X - Passing Curiosity (passingcuriosity.com)
    #dnsmasq #osx #development
    Sat, Oct 10, 2015 3:21pm -07:00
  • Lessons learned from the big rewrite (www.anton-pirker.at)
    #software #development #rewrite
    Sun, Jan 11, 2015 5:56am -08:00
  • The definitive guide to setting up a new mac for development (alexw.me)
    #development #mac #osx
    Mon, Oct 28, 2013 9:43am -07:00
  • Gem in a Box (tomlea.co.uk)
    Run your own Gem server
    #development #gem #ownyourdata #ruby
    Sat, Jun 15, 2013 10:09am -07:00
  • A Reasonable PHP Development Stack

    Aaron Parecki
    Sat, Mar 16, 2013 9:59am -07:00

    Lately I've been doing a lot of development in Ruby, specifically with Sinatra and Sequel, and I've been liking that development stack a lot. So much so, that when I switch back to PHP for a project, I wish my PHP stack was more like my Ruby stack.

    I managed to put together a few PHP projects that result in a very similar framework, described below.

    Slim Framework

    Slim Framework is a PHP micro-framework, very similar to Sinatra. I settled on this one because of its similarities to Sinatra.

    <?php
    $app = new \Slim\Slim();
    $app->get('/hello/:name', function($name) {
        echo "Hello, $name";
    });
    $app->run();
    ?>
    

    PHP Savant

    PHP Savant is a simple templating engine for PHP. After evaluating several "minimal" templating engines, I liked PHP Savant the best because of its simplicity.

    It was one of the few that actually lets you write PHP in the views. Most try to create an abstraction where you have to learn a new syntax for outputting variables and writing "for" loops.

    Here is an example controller and corresponding view code:

    Controller

    <?php
    // Load the Savant3 class file and create an instance.
    require_once 'Savant3.php';
    $tpl = new Savant3();
    
    $tpl->title = $name;
    
    $tpl->display('books.tpl.php');
    ?>
    

    View

    <html>
        <head>
            <title><?= $this->title ?></title>
        </head>
        <body>
        ...
    

    The great thing is that since the views are actually PHP, you can write whatever PHP code you want in them. You can do things like $date->format() or simple foreach loops without having to learn another syntax. The downside is the project hasn't been updated since 2011, although I haven't run in to any major issues with it yet. If you know of a similar templating engine I'd be happy to learn about it.

    This is worth repeating: I am not interested in a templating framework that invents its own syntax. PHP, Ruby and Perl can all be used as templating frameworks, there is no reason to re-invent this. I do not want to use Smarty, Haml, Liquid, etc. These are all abstractions. I just want to write HTML with some variables stuck in it. PHP Savant and Ruby's ERB are the only ones I've found that do this.

    Idiorm

    Idiorm is the simplest PHP ORM I could find. It is very similar to Sequel for Ruby. It provides a simple wrapper around building queries.

    <?php
    ORM::configure('mysql:host=localhost;dbname=test');
    
    // Simple Queries
    $numUsers = ORM::for_table('users')->count();
    $users = ORM::for_table('users')->find_many();
    
    foreach($users as $user) {
      echo $user->name;
    }
    
    // Inserting a Record
    $user = ORM::for_table('users')->create();
    $user->username = 'bob';                // setting properties
    $user->set('age', 25);                  // the set() method
    $user->set_expr('created_at', 'NOW()'); // setting values as expressions
    $user->set(array(                       // setting bulk properties
      'first_name' => 'Bob',
      'last_name' => 'Smith'
    ));
    $user->save();
    ?>
    

    This ORM does not provide concrete classes for your database tables. If you're looking for something more like Ruby's ActiveRecord or DataMapper, then you can also try Paris which is built on top of Idiorm.

    The Full Stack: Slim/Savant/Idiorm

    Put together, this stack is very similar to a common stack in Ruby. The table below shows the comparable Ruby and PHP components.

    Component PHP Ruby
    Routing Slim Sinatra
    Templating Savant Erb
    Database Idiorm Sequel
    Projects I've written with this stack IndieNews IndieAuth
    Pingback
    Flickr Archiver

    Front-End

    It's worth noting that this stack will work with any front-end environment. You can use any CSS or Javascript framework with this, this environment doesn't care.

    45.530858, -122.684422
    #php #development #framework
    Sat, Mar 16, 2013 9:59am -07:00
  • Why do web sites and software take so long to build? And why is it so hard? (www.scottporad.com)
    #development #software
    Mon, May 7, 2012 12:01am -07:00
  • It’s Insanely Hard to Make a Kick-Ass iPhone App (www.georgesaines.com)
    #business #development #iphone #UI
    Thu, Dec 8, 2011 8:27pm -08:00
  • localtunnel (progrium.com)
    instantly show localhost to the rest of the world
    #development #gem #resources #ruby #ssh #tools #tunnel #website
    Tue, Aug 16, 2011 11:43am -07:00
  • Using sprite sheets in Cocos2d and Tiled (part 2) (indiedevstories.com)
    #cocos2d #development #game #iphone #sprite
    Tue, May 31, 2011 7:41am -07:00
next

Hi, I'm Aaron Parecki, co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and am the editor of several W3C specifications. I record videos for local conferences and help run a podcast studio in Portland.

I wrote 100 songs in 100 days! I've been tracking my location since 2008, and write down everything I eat and drink. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

Follow
  • Security Architect at Okta
  • IndieWebCamp Founder
  • W3C Editor

  • W7APK
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Sleep
  • Trips
  • Contact
© 1999-2019 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons