HN user

ptgloden

369 karma

https://ptgolden.org

Posts11
Comments18
View on HN

I've really enjoyed using jxnblk's approach to styling. I started with basscss [1], then moved on to rebass, and finally settled on axs [2]. They all take more or less the same approach, but operate differently. Rebass generates inline styles; basscss is simply a CSS file that defines a set of utility classes (like `mb2`, `p3`, `flex-none`, etc.); and axs dynamically generates CSS classnames and stylesheets.

...Or at least, that used to be the case. Looking at the most recent version of rebass, it looks as if it uses the same dynamic classname/stylesheet generation strategy. Now I'm not so sure what the difference between rebass and axs are, except that the former seems to be a comprehensive set of UI components, and the latter a tool for generating your own component library.

In any case, I'm glad jxnblk keeps experimenting with these libraries, even if it's hard to keep up with the changes. Their surface area is so small that it's easy to pick up the API and it doesn't feel like a risk or burden to stay on older versions.

[1] http://basscss.com/

[2] http://jxnblk.com/axs/

PeriodO | Front-end developer | Part-time | Austin, TX and Chapel Hill, NC | http://perio.do/ | REMOTE

PeriodO (Periods, Organized) is a two-year grant-funded project to help scholars, students, librarians, archivists, and museum curators understand and manage differences in how time periods are defined. For example, many archaeologists may use the term “Bronze Age,” yet each may define the spatial and temporal extent of that period differently. During the first phase of the project (funded by the National Endowment for the Humanities) we collected over 3500 of these time period definitions and developed a tool for curating them. The Institute of Museum and Library Services is now funding the next phase, which will focus on tools for visualizing differences and patterns among period definitions.

We are hiring one part-time JavaScript developer who will help our two programmers (a PhD student and professor at the University of North Carolina) build interfaces that will allow our users to visualize, find, and curate relevant time periods for their work. This developer should have experience with React, d3, and modular JavaScript design. Familiarity with RDF would be beneficial. The time commitment is negotiable, although all work must be completed by May 2018 at the latest. All work will be remote. Email ryanshaw@unc.edu with a resume and short introduction if interested.

In ES6, you can write more terse immediately invoked function expressions. So you could use

  var a = (prop => prop > 5 ? prop : whatever)(objImUsing.prop.someLongName)
rather than
  var a = (function (prop) { return prop > 5 ? prop : whatever })(objImUsing.prop.someLongName)

On points 1 and 3 especially, I highly recommend Bike Snob NYC's new book "Bike Snob Abroad." [1] He writes about the viability and acceptability of everyday cycling in New York City (his home), and then does the same while travelling to London and Amsterdam. One of his observations is that infrastructure isn't everything-- cycling is still a "special" thing to do in Portland, the Bay Area, or New York City, after all. Rather, in a place like the Netherlands, cycling is just a normal thing to do that doesn't require specialized, expensive gear, lycra, or even (gasp) helmets.

I don't think there's a simple way to get to that point anywhere in America. His hunch, one I agree with, is that people in this country have to make things The Biggest and The Fastest and The Best, which is why we are at the forefront of bike technology & craftsmanship but are so pisspoor when it comes to cycling as a safe, simple means of transportation.

[1] http://www.chroniclebooks.com/titles/a-bike-snob-abroad.html

Agreed on the console not displaying objects well. I find that to be especially true with DOM nodes.

FF:

  >>> document.getElementsByTagName('div')
  (pocs:({}), pocs0:({}), pocs1:({}), pocs2:({}), cst:({}), mngb:({}), ... )
Firebug:
  >>> document.getElementsByTagName('div')
  HTMLCollection[div#pocs, div#pocs0, div#pocs1, div#pocs2, div#cst, div#mngb, ... ]
Chromium:
  >>> document.getElementsByTagName('div')
  [<div id=​"pocs" style=​"display:​ none;​ position:​ absolute;​">​…​</div>​, 
  <div id=​"pocs0">​…​</div>​, 
  <div id=​"pocs1">​…​</div>​, 
  <div id=​"pocs2">​Press Enter to search.​</div>​,
  <div id=​"cst" style=​"display:​none">​</div>​, 
  <div id=​"mngb">​…​</div>, ... ]

(edit: formatting)

I'd also like to see more readline-like behavior. It's hard to stop entering C-p and C-n to explore the command history, which currently bring up a print dialog/new window.

Currently I hack some limited readline functionality with Pentadactyl, which is probably appropriate given the potential invasiveness of that change. But if we're talking about dream FF dev features-- there you go.

Class based views have really helped me get rid of ugly, complex, and deeply nested form handling views. I recommend looking at the source for the form wizard views mentioned in the article as well as all the views and mixins in django.views.generic.edit. As the article mentions, their features aren't always completely documented, but the code is very easy to follow.

They identified the Mozilla home page as an example of responsive design, not Firefox. The feature being demonstrated with that example was the ability to "resize" the browser window to see how a page built with "responsive design" in mind would be rendered with, say, a mobile device with a smaller screen. Pretty useful, if you ask me.

-2000 Lines Of Code 14 years ago

An attempt at an earnest reply-- I've been reading HN for about a year (this is my first comment). Speaking as someone trying to tackle the impossibly massive field of "doing things on computers" by myself, I deeply appreciate that this isn't simply a "news website," and that the community raises issues that didn't just pop up in the last couple weeks. I've learned so much from articles that have been posted before that I never would have discovered otherwise, and I'm always a little bit disappointed when I see replies like this one. I understand concern about rapid reposts, but this was posted two years ago and then one year ago. The vitriol is completely unwarranted. Not all of us are seasoned veterans with knowledge going back decades or years or even months, no matter how much we probably wish that wasn't the case!