HNHacker News
TopNewBestAskShowJobs

scottfr

1,349 karma · joined May 29, 2012

submissionscomments
scottfr··on Launch HN: Text Blaze (YC W21) Programmable snippets to automate tedious typing
I discussed our dynamic features a bit in an earlier comment, but I want to highlight what a Chrome focused extension offers over a system wide app.

As a Chrome extension, Text Blaze can use the contents of the webpage you are on in your snippet.

For example, if you replied to an email in Gmail, the following Text Blaze snippet would pull in the name of the person you were replying to automatically (the bit after the `selector=` is a CSS selector):

```

Hello {site: text; selector=.h7:last-child .gD},

...

```

CSS selectors are much too technical for most users and this one in particular is quite ugly, but we are planning on developing higher-level functionality to make this much more accessible in the future.

scottfr··on Launch HN: Text Blaze (YC W21) Programmable snippets to automate tedious typing
We definitely want to add Firefox support!

We haven't yet done so because we really want to nail the experience on a single platform first (Chrome).

Text insertion on the web is actually surprisingly complex [0] and we leverage some DOM API's that aren't fully standardized yet. Focusing just on Chrome for the moment allows us to really figure out the experience before we expand to other browsers like Firefox, along with Desktop and Mobile applications.

[0] There are so many different ways to support text input on the web. Take Google Docs for instance; when you type into it, you are actually typing into a hidden iframe element that captures your keystrokes and then updates the document model. Figuring out how to support all these edge cases is tricky.

scottfr··on Launch HN: Text Blaze (YC W21) Programmable snippets to automate tedious typing
Text Blaze is a freemium product. The free version works great for basic use cases and also lets you try out the more advanced features. Then we have paid versions that offer more advanced features (like embedded forms and formulas) and improved team collaboration.

We actually are interested in the possibility of selling premium snippet packs. Not something we have had time to explore at the moment, but the "give the razor away" model is an interesting one.

scottfr··on Launch HN: Text Blaze (YC W21) Programmable snippets to automate tedious typing
I am not an expert in Alfred so I can't talk too specifically to it. However, there is a lot of competition out there in this space like Alfred, Keyboard Maestro, Text Expander, Typinator, etc...

One thing special Text Blaze offers is the ability to make dynamic forms with formulas. For instance say you had an invoice snippet. With Text Blaze you could do something like this

```

Cost: ${formtext: name=price}

With tax (15%): ${=price * 1.15}

```

This will create a snippet with a text box for the cost and then a dynamically calculated field that applies the 15% tax.

This is just a simple example but you can well beyond it to embed logic and dynamic behavior directly in your snippets.

Beyond dynamic behavior, we're very focused on ease of use and collaboration across teams of users (which is important for business use cases).

scottfr··on Stan is a state-of-the-art platform for statistical modeling
Stan: Predict the values of parameters in a model

Deep Learning: Predict an outcome variable

For example, if I want to know what effect household income has on a student's chance of getting into college, Stan would allow you to estimate that given a proposed model.

If instead I wanted to predict a given student's chance of getting into college, I might use Machine Learning.

Of course, those two problems are linked, but it's a fundamental difference of focus.

scottfr··on Google Analytics Opt Out
Chrome Extension content scripts are evaluated in an isolated JavaScript environment which does not share variables with the page's JavaScript.

By creating a script in the page itself, the "_gaUserPrefs" variable is made accessible to the Google Analytics script.

scottfr··on WhatWG: Proposal – Update XPath to at least v2.0
While we are on the topic of XPath improvements, I would love to see a built-in XPath syntax to pierce the shadow DOM of Web components.

It's an important need for the automation and testing use cases. Without it, targeting an element within a web component simply cannot be done solely with a single selector.

scottfr··on Declarative Shadow DOM
Chrome was at one point developing a `scoped` attribute on the `<style>` element for scoping stylesheets that would not require WebComponents.

`<style scoped>`

However, it was abandoned partly because it "adds a lot of complexity to how the scoped style system works for Shadow DOM".

https://chromestatus.com/feature/5374137958662144

https://groups.google.com/a/chromium.org/g/blink-dev/c/R1x18...

scottfr··on Fig: Visual Apps and Shortcuts for Your Terminal
> If you want a GUI for some commands, why not just get GUI apps which do those things? Why try to bolt a GUI onto a CLI, especially one that works by pasting commands back into a CLI?

Having both provides a smooth skill ramp for users. They can start using the GUI and over time they learn the analogous command line interface.

A GUI is also superior for discoverability compared to a command line interface even for experienced users.

scottfr··on Immutable Databases
I was reading BigQuery the Definitive Guide last week and I was surprised to learn that BigQuery is actually immutable at its core even when using DML statements.

This is surfaced in the query language and you can query the table as it existed in the past using the syntax:

  SELECT * FROM
    table_name
  FOR SYSTEM TIME AS OF
    TIMESTAMP_ADD(CURRENT_TIMESTAMP(), INTERVAL -5 DAY)
The tables get rewritten periodically squashing this change history so you can only access states for the past week.
scottfr··on In Praise of AutoHotKey
My company is trying to solve similar challenges for automating common typing tasks on web pages (email, chat, CRM, etc...) with our Chrome Extension Text Blaze [1].

It was a pretty extensive formula support [2] enabling you to create dynamic snippets. In many ways it's kind of like Excel but for documents.

[1] https://blaze.today/

[2] https://blaze.today/formulas/reference/

scottfr··on Porting a React Front End to TypeScript
You can get a lot of the benefits of Typescript in VSCode without leaving JavaScript behind by using JSDoc.

Typescript will pick up the JSDoc type annotations and use them to type the code. This can be a great option when typing an existing project.

Docs: https://www.typescriptlang.org/docs/handbook/type-checking-j...

scottfr··on A cold outreach strategy that works
This is a great point and also very applicable to sales generally. There's definitely a continuum between "hyper target / completely customized" and "spray and pray" and each person/company needs to find the right point on that continuum for themselves.

My company actually just put out a blog post last week on this showing how to quickly create customized emails while still leveraging templates [0].

[0] https://blaze.today/blog/best_sales_cold_email_templates_and...

scottfr··on Google Plots Course to Overtake Cloud Rivals
Firebase is fantastic. There is also a steady drumbeat of continual improvements going on in Firebase that keeps making it better and better.

Even when Firebase is using other GCP products under the hood (e.g. Firebase Storage is Cloud Storage and Firebase Functions are Cloud Functions) they often provide a better developer experience that makes things flow smoother. For example, having a Firebase Function running on a schedule is a just an added line in your functions config whereas running a Cloud Function on a schedule requires setting up a Cloud Scheduler Job and linking everything together with PubSub.

scottfr··on Global warming has begun to make Norway warmer and wetter
ax ads ax ads
scottfr··on Secure EcmaScript, a runtime for running third-party code safely
"Still under development: do not use for production systems yet, there are known security holes that need to be closed."

Also note the experience of Figma who used the realms shim I think this project is using to secure Figma's JS based plug-ins system, only to promptly take a different approach when compromises were identified:

https://www.figma.com/blog/how-we-built-the-figma-plugin-sys...

https://www.figma.com/blog/an-update-on-plugin-security/

I am looking forward to Realms. Until then, I am doubtful of attempts to fully secure third party JS execution in the browser's engine.

scottfr··on Gitlab ‘rethinking’ third-party telemetry
I am a bit surprised at the extreme negativity here. Obviously, this was mismanaged on many fronts [1], however the idea of tracking product usage in order to improve the product is generally a good thing, not a bad thing.

Hacker News likes to complain about how bad the Gitlab UI is compared to Github, or how slow things are on Gitlab, or how they are doing too many things and need to focus their product better. Well, knowing how their users are using the product is one key part to improving all these things and delivering a better product.

As a paid user of the Gitlab.com product, I am fine having them carry out analytics on user behavior like my own. That said, I do use an ad blocker and if they use 3rd party trackers I'll definitely be blocking those trackers.

[1] E.g. the use of third parties for the telemetry. They should definitely be using in house systems for something like this not 3rd parties in order to protect their user data. Also, they should not be rolling this out to self-hosted versions.

scottfr··on LastPass Extension slows Chrome's responsiveness by up to 50%
If you take a look at their extension, it injects a number of separate content scripts on the document_start event for a webpage. This blocks document loading and Google's recommendation is to load content scripts on document_idle which would not block loading.

These scripts that are injected into every page (including all iframes) include this one which is a 25,000 line file:

https://crxcavator.io/source/hdokiejnpimakedhajhdlcegeplioah...

Things like this can have large impact on performance. My company develops a Chrome extension and we are very focused on optimizing the performance of our content script and minimizing its impact on host pages. We handwrite all the Javascript code in the content script and manually include the very few third party dependencies we have in it. Yes, it would be a lot easier to use NPM with Webpack to build the content script file, but it's important to keep content scripts as slim as possible.

scottfr··on Programming Idioms
That's also problematic. If w includes characters that have special meaning in a regex (e.g. a period), this will cause issues.

You could try to escape those special characters but that is potentially error prone.

For an arbitrary w, one approach is something kind of awful like:

  let s2 = s1;
  while (s2.includes(w)) {
    s2 = s2.replace(w, '')
  }
Edit: minitech's solution is better.
scottfr··on Programming Idioms
There are also issues with the JS examples.

For example:

"""

Remove all occurrences of string w from string s1, and store the result in s2.

var s2 = s1.replace(w, '');

"""

Since w is a string, this will only replace the first occurrence, not all occurrences.

scottfr··on Ask HN: How do you manage event tracking at your workplace
Google Cloud Function streaming inserts to BigQuery. Then analysis is carried out with the BigQuery UI (ad hoc analyses or scheduled queries for pipelines), DataStudio (visualizations -- we use this infrequently, it's really not great) or Google Colab (statistical analyses, complex visualizations).

The pros are:

* full SQL access to the data via BigQuery

* simple to set up (yes, you have to write custom code; but a basic implementation is on the order of a couple dozen of lines of code)

* we have full ownership of the data across the pipeline (better for user privacy than using another 3rd party)

Prior to this we used Google Analytics, but their paid solution is too expensive for us and their analytics/aggregation API (though quite powerful) samples a subset of the data which was not acceptable for some of our use cases.

scottfr··on Open-source Chrome extension to save the state of a page for further analysis
Extension content scripts can inject script elements into their pages which then allow them to access the page's JS variables. But even then there wouldn't be any way to access key parts of the state like closures.
scottfr··on Was MongoDB Ever the Right Choice?
If I understand your query correctly, Google Cloud Firestore would support it.

https://firebase.google.com/docs/firestore/query-data/querie...

scottfr··on AWS API Performance Comparison: Serverless vs. Containers
> First, I ran a small sample of 2000 requests to check the performance of new deploys. This was running at around 40 requests per second.

...

> When I ran my initial Fargate warmup, I got the following results. Around 10% of my requests were failing altogether!

....

> To remedy this, I decided to bump the specs on my deployments.

> The general goal for this bakeoff is to get a best-case outcome for each of these architectures, rather than an apples-to-apples comparison of cost vs performance.

> For Fargate, this meant deploying 50 instances of my container with pretty beefy settings — 8 GB of memory and 4 full CPU units per container instance.

scottfr··on Ask HN: Best way to introduce programming to a 5 year old?
I've been trying to teach my 5 year old with a custom language/app I built a while ago:

http://modelian.com/

Basically, it's a programming language to make very basic 2d physics simulations.

It's actually gone really well, she loves changing the size and colors of the shapes. She's learned how to type (keys, capitals, arrows, backspace, etc...) and how to manipulate a lot of things.

I wouldn't say she is really "programming" yet; it's more of "I know this number changes the size of the block and this other thing changes the color". Anyways it's a great start and we have a lot of fun on it together.

(Note I built this a a while ago on Parse which has since shutdown so the saving/account functionality doesn't work any more. You need to copy your scripts to a text file to save.)

scottfr··on Don’t buy the MacBook Pros even on sale, in my opinion
I got one of the new MacBooks at work. After a few months the 'G' key started getting flaky. Sometimes it would work, sometimes it would do nothing, sometimes it would trigger twice for a single key press.

I took it to our tech support, after spraying air and all the recommended steps they could not fix it. They took it and gave me a new one.

After a month, the 'B' key on that new laptop started to be flaky.

Unless Apple manages to fix this, my next computers at both work and home will not be Macintoshes. After over a decade of loving Mac laptops, I will either be switching over to Windows (WSL looks great) or Chromebooks.

scottfr··on TSB Bank: Botched upgrade has left customers unable to access their accounts
In the US civil engineers must go through a multi-year certification process that involves a significant amount of on the job work in addition to standardized examination before they are labelled a Professional Engineer (PE).

As a PE, they can face significant legal repercussions for errors in work they approve.

The benefit to the PE is that many Civil Engineering projects are legally required to have a PE design/approve them. The PE literally has a physical stamp they use to stamp blueprints and designs when they approve it. Work won't proceed without that stamp.

So, if a PE refused to approve a bridge design, presumably it would be very difficult to find another PE who would approve it (especially given the record of the first PE rejecting the plans) and the work would not proceed.

scottfr··on Gitlab 10.7 Released
They have a dedicated section about performance improvements in the release notes.

It links to a list of 53 commits from this release targeting performance:

https://gitlab.com/groups/gitlab-org/-/merge_requests?scope=...

scottfr··on The Irreproducibility Crisis of Modern Science
I'm not sure I really agree with this, because in science studies are biased towards aligning with the results of previous studies. This can be due to many factors: authors' expectations, journals like to publish positive over negative results, peer reviewers will look more critically (in an analytical sense) at work that disagrees with accepted research, etc....

It can be very hard for many reasons to stand up and say "this prior work is wrong".

scottfr··on Remote-Browser – A browser automation framework based on the Web Extensions API
The point is you can't accurately simulate typing without something like Selenium. Neither the standard DOM API nor the additional features provided by the Web Extension API allow you to do so.

You can simulate some parts of typing by mimicking browser behavior on a case by case basis, but there are places where this will be strictly impossible. For example, if you are working with anything that checks the isTrusted event bit, you're out of luck as you there is no mechanism for you to set that to true.

Selenium on the other hand is actually triggering events as if a person physically triggered them. So, for instance, the isTrusted bit will be set to true when you use the send_keys method in Selenium.

← PreviousPage 2 of 5Next →