Breck's Blog - Programming Posts

HTML | TXT | PDF

May 21, 2024

All tabular knowledge can be stored in a single long plain text file.

The only syntax characters needed are spaces and newlines.

This has many advantages over existing binary storage formats.

Using the method below, a very long scroll could be made containing all tabular scientific knowledge in a computable form.

Continue reading...

May 12, 2024 β€” The Four Seasons website says

Treat others as you wish to be treated

Sometimes Four Seasons sends me random emails.

When I reply with a random email of my own I get

DoNotReply@fourseasons.com does not receive emails.
Continue reading...

Datasets are automated tests for world models

April 23, 2024 β€” I wrapped my fingers around the white ceramic mug in the cold air. I felt the warmth on my hands. The caramel colored surface released snakes of steam. I brought the cup to my lips and took a slow sip of the coffee bean flavored water inside.

Happiness is a hot cup of coffee in a ceramic mug on a cold day.

Continue reading...

Menu Instructions

Congrats on landing a job at Big O's Kitchen!

Our menu has 7 dishes.

Below are the instructions for making each dish.

Continue reading...

April 2, 2024 β€” It has been over 3 years since I published the 2019 Tree Notation "Annual" Report. An update is long overdue. This is the second and last report as I am officially concluding the Tree Notation project.

I am deeply grateful to everyone who explored this idea with me. I believe it was worth exploring. Sometimes you think you may have discovered a new continent but it turns out to be just a small, mildly interesting island.

Continue reading...

February 24, 2024 β€” In the near future AI will be able to generate an extensive list and rating of all of the skills in someone's brain.

The ugly prototype I made at a hackathon in 2023 to explore this idea.

Continue reading...

February 21, 2024 β€” Everyone wants Optimal Answers to their Questions. What is an Optimal Answer? An Optimal Answer is an Answer that uses all relevant Cells in a Knowledge Base. Once you have the relevant Cells there are reductions, transformations, and visualizations to do, but the difficulty in generating Optimal Answers is dominated by the challenge of assembling data into a Knowledge Base and making relevant Cells easily findable.

Activated Cells in a Knowledge Base.

Continue reading...

January 12, 2024 β€” For decades I had a bet that worked in good times and bad: time you invest in word skills easily pays for itself via increased value you can provide to society. If the tide went out for me I'd pick up a book on a new programming language so that when the tide came back in I'd be better equipped to contribute more. I also thought that the more society invested in words, the better off society would be. New words and word techniques from scientific research helped us invent new technology and cure disease. Improvements in words led to better legal and commerce and diplomatic systems that led to more justice and prosperity for more people. My read on history is that it was words that led to the start of civilization, words were our present, and words were our future. Words were the safe bet.

Continue reading...

January 1, 2024 β€” Happy New Year!

First, a disclaimer. I think a lot of my posts are my attempts to reflect on experiences and write tight advice for my future self. This one is less of that and more just unsophisticated musings on an intriguing thought that crossed my mind. I am taking advantage of it being New Year's day to yet again try and force myself to publish more.

Continue reading...

December 28, 2023 β€” I thought we could build AI experts by hand. I bet everything I had to make that happen. I placed my bet in the summer of 2022. Right before the launch of the Transformer AIs that changed everything. Was I wrong? Almost certainly. Did I lose everything? Yes. Did I do the right thing? I'm not sure. I'm writing this to try and figure that out.

Continue reading...

June 16, 2023 β€” Here is an idea for a simple infrastructure to power all government forms, all over the world. This system would work now, would have worked thousands of years ago, and could work thousands of years in the future.

Continue reading...

January 3, 2023 β€” Greater than 99% of the time symbols are read and written on surfaces with spines. You cannot get away from it. Yet still, amongst programming language designers there exists some sort of "spine blindness". They overlook the fact that no matter how perfect their language, it will always be read and written by humans on surfaces with spines, as surely as the sun rises. Why they would fight this and not embrace this is beyond me. Nature provides, man ignores.

My M1 MacBook screen, paper notebook, notepads, and my 1920 copy of Einstein's Theory of Relativity, all have spines.

Continue reading...

December 30, 2022 β€” Forget all the "best practices" you've learned about web forms. Everyone is doing it wrong. The true best practice is this: every web form on earth can and should be replaced by a single textarea.

Every single web form on earth can (and should) be represented in a single textarea as plain text with no visible syntax using Tree Notation or a similar base 2D notation. In this demo gif we see someone using one textarea to fill out an application to YCombinator. As this continues to catch on, the network effects will take over and conducting business on the web will become far faster and more user friendly (web 4.0?).

Continue reading...

November 16, 2022 β€” I dislike the term first principles thinking. It's vaguer than it needs to be. I present an alternate term: root thinking. It is shorter, more accurate, and contains a visual:

Sometimes we get something wrong near the root which limits our late stage growth. To reach new heights, we have to backtrack and build up from a different point.

Continue reading...

November 14, 2022 β€” Imagine a waitress that drops off your food then immediately puts on noise cancelling headphones, turns and walks away. That's the experience a noreply email address provides. Let's make email human again! If a human can't read and reply to emails it's not too hard to setup scripts that can at least do something for the customer.

My automated campaign against no reply email addresses. Anytime a company sends a message from a noreply address they get this as a response. I am aware of the irony.

Continue reading...

A Small Open Source Success Story

Adding 3 missing characters made code run 20x faster.

Map chart slowdown

June 9, 2022 β€” "Your maps are slow".

In the fall of 2020 users started reporting that our map charts were now slow. A lot of people used our maps, so this was a problem we wanted to fix.

Suddenly these charts were taking a long time to render.

k-means was the culprit

To color our maps an engineer on our team utilized a very effective technique called k-means clustering, which would identify optimal clusters and assign a color to each. But recently our charts were using record amounts of data and k-means was getting slow.

Using Chrome DevTools I was able to quickly determine the k-means function was causing the slowdown.

Continue reading...

December 15, 2021 β€” Both HTML and Markdown mix content with markup:

html A link in HTML looks like <a href="hi.html">this</a> markdown A link in Markdown looks like [this](hi.html).

I needed an alternative where content is separate from markup. I made an experimental minilang I'm calling Aftertext.

aftertext A link in Aftertext looks like this. link hi.html thisContinue reading...

August 11, 2021 β€” In this essay I'm going to talk about a design pattern in writing applications that requires effectively no extra work and more than triples the power of your code. It's one of the biggest wins I've found in programming and I don't think this pattern is emphasized enough. The tldr; is this:

When building applications, distinguish methods that will be called by the user.
Continue reading...

February 22, 2021 β€” Today I'm launching the beta of something new called Scroll.

I've been reading the newspaper everyday since I was a kid. I remember I'd have my feet on the ground, my body tilted at an angle and my body weight pressed into the pages on the counter. I remember staring intently at the pages spread out before me. World news, local news, sports, business, comics. I remember the smell of the print. The feel of the pages. The ink that would be smeared on my forearms when I finished reading and stood back up straight. Scroll has none of that. But it does at least have the same big single page layout.

Continue reading...

December 9, 2020 β€” Note: I wrote this early draft in February 2020, but COVID-19 happened and somehow 11 months went by before I found this draft again. I am publishing it now as it was then, without adding the visuals I had planned but never got to, or making any major edits. This way it will be very easy to have next year's report be the best one yet, which will also include exciting developments in things like non-linear parsing and "forests".

In 2017 I wrote a post about a half-baked idea I named TreeNotation.

Since then, thanks to the help of a lot of people who have provided feedback, criticism and guidance, a lot of progress has been made flushing out the idea. I thought it might be helpful to provide an annual report on the status of the research until, as I stated in my earlier post, I "have data definitively showing that Tree Notation is useful, or alternatively, to explain why it is sub-optimal and why we need more complex syntax."

Continue reading...

January 29, 2020 β€” In this long post I'm going to do a stupid thing and see what happens. Specifically I'm going to create 6.5 million files in a single folder and try to use Git and Sublime and other tools with that folder. All to explore this new thing I'm working on.

TreeBase is a new system I am working on for long-term, strongly-typed collaborative knowledge bases. The design of TreeBase is dumb. It's just a folder with a bunch of files encoded with Tree Notation. A row in a normal SQL table in TreeBase is roughly equivalent to a file. The filenames serve as IDs. Instead of each using an optimized binary storage format it just uses plain text like UTF-8. Field names are stored alongside the values in every file. Instead of starting with a schema you can just start adding files and evolve your schema and types as you go.

Continue reading...

January 20, 2020 β€” In this post I briefly describe eleven threads in languages and programming. Then I try to connect them together to make some predictions about the future of knowledge encoding.

This might be hard to follow unless you have experience working with types, whether that be types in programming languages, or types in databases, or types in Excel. Actually, this may be hard to follow regardless of your experience. I'm not sure I follow it. Maybe just stay for the links. Skimming is encouraged.

Continue reading...

January 3, 2020 β€” Speling errors and errors grammar are nearly extinct in published content. Data errors, however, are prolific.

Continue reading...

July 18, 2019 β€” In 2013 I sent a brief email to 25 programmers whose programs I admired.

"Would you be willing to share the # of hours you have spent practicing programming? Back of the envelope numbers are fine!"

Some emails bounced back.

Some went unanswered.

But five coders wrote back.

This turned out to be a tiny study, but given the great code these folks have written, I think the results are interesting--and a testament to practice!

Name GitHubId Hours YearOfEstimate BornIn
Donald Knuth 56000 2013 1938
Rob Pike robpike 30000 2013 1956
Peter Norvig norvig 30000 2013 1956
Stephen Wolfram 50000 2013 1959
Lars Bak larsbak 30000 2013 1965
Continue reading...

June 23, 2017 β€” I just pushed a project I've been working on called Ohayo.

You can also view it on GitHub: https://github.com/treenotation/ohayo

I wanted to try and make a fast, visual app for doing data science. I can't quite recommend it yet, but I think it might get there. If you are interested you can try it now.

Continue reading...

June 21, 2017 β€” Eureka! I wanted to announce something small, but slightly novel, and potentially useful.

What did I discover? That there might be useful general purpose programming languages that don't use any visible syntax characters at all.

I call the whitespace-based notation Tree Notation and languages built on top of it Tree Languages.

Continue reading...

A Suggestion for a Simple Notation

September 24, 2013 β€” What if instead of talking about Big Data, we talked about 12 Data, 13 Data, 14 Data, 15 Data, et cetera? The # refers to the number of zeroes we are dealing with.

You can then easily differentiate problems. Some companies are dealing with 12 Data, some companies are dealing with 15 Data. No company is yet dealing with 19 Data. Big Data starts at 12 Data, and maybe over time you could say Big Data starts at 13 Data, et cetera.

Continue reading...

September 23, 2013 β€” Making websites is slow and frustrating.

Continue reading...

April 2, 2013 β€” For me, the primary motivation for creating software is to save myself and other people time.

I want to spend less time doing monotonous tasks.

Less time doing bureaucratic things. Less time dealing with unnecessary complexity. Less time doing chores.

I want to spend more time engaged with life.

Continue reading...

March 16, 2013 β€” A kid says Mommy or Daddy or Jack or Jill hundreds of times before grasping the concept of a name.

Likewise, a programmer types name = Breck or age=15 hundreds of times before grasping the concept of a variable.

What do you call it when someone finally sees the concept?

John Calcote, a programmer with decades of experience, calls it a minor epiphany.

Continue reading...

December 14, 2012 β€” Note is a structured, human readable, concise language for encoding data.

Continue reading...

November 20, 2012 β€” "Is simplicity ever bad?" If you had asked me this a year ago, I probably would have called you a fucking moron for asking such a dumb question. "Never!", I would have shouted. Now, I think it's a fair question. Simplicity has it's limits. Simplicity is not enough, and if you pursue simplicity at all costs, that can be a bad thing. There's something more than simplicity that you need to be aware of. I'll get to that in a second, but first, I want to backtrack a bit and state clearly that I do strongly, strongly believe and strive for simplicity. Let me talk about why for a second.

Continue reading...

October 20, 2012 β€” I love to name things.

I spend a lot of time naming ideas in my work. At work I write my code using a program called TextMate. TextMate is a great little program with a pleasant purple theme. I spend a lot of time using TextMate. For the past year I've been using TextMate to write a program that now consists of a few hundred files. There are thousands of words in this program. There are hundreds of objects and concepts and functions that each have a name. The names are super simple like "Pen" for an object that draws on the screen, and "delete" for a method that deletes something. Some of the things in our program are more important than others and those really important ones I've renamed dozens of times searching for the right fit.

Continue reading...

March 30, 2011 β€” Railay is a tiny little beach town in Southern Thailand famous for its rock climbing. I've been in Railay for two weeks. When the weather is good, I'm outside rock climbing. When the weather is bad, I'm inside programming. So naturally I've found myself comparing the two. Specifically I've been thinking about what I can take away from my rock climbing experience and apply to my programming education.

Here's what I've come up with.

1. You should always be pushing yourself. Each day spent climbing I've made it to a slightly higher level than the previous day. The lazy part of me has then wanted to just spend one day enjoying this new level without pushing myself further. Luckily I've had a great climbing partner who's refused that and has forced me to reach for the next level each day. In both rock climbing and programming you should always be reaching for that new level. It's not easy, you have to risk a fall to reach a new height, but it's necessary if you want to become good. In programming, just like in climbing, you should be tagging along with the climbers at levels above you. That's how you get great. Of course, don't forget to enjoy the moment too.

Continue reading...

August 25, 2010 β€” Ruby is an awesome language. I've come to the conclusion that I enjoy it more than Python for the simple reason that whitespace doesn't matter.

Python is a great language too, and I have more experience with it, and the whitespace thing is a silly gripe. But I've reached a peak with PHP and am looking to master something new. Ruby it is.

Continue reading...

July 2, 2010 β€” A year ago I wrote a post titled The Truth about Web Design where I briefly argued that "design doesn't matter a whole lot."

My argument was: "you go to a website for the utility of it. Design is far secondary. There are plenty of prettier things to look at in the real world."

I do think the real world is a pretty place, but about design, I was completely wrong.

Continue reading...

June 15, 2010 β€” I think it's interesting to ponder the value of information over it's lifetime.

Different types of data become outdated at different rates. A street map is probably mostly relevant 10 years later, while a 10 year old weather forecast is much less valuable.

Phone numbers probably last about 5 years nowadays. Email addresses could end up lasting decades. News is often largely irrelevant after a day. For a coupon site I worked on, the average life of a coupon seemed to be about 2 weeks.

If your data has a long half life, then you have time to build it up. Wikipedia articles are still valuable years later.

What information holds value the longest? What are the "twinkies" of the data world?

Books, it seems. We don't regularly read old weather forecasts, census rolls, or newspapers, but we definitely still read great books, from Aristotle to Shakespeare to Mill.

Facts and numbers have a high churn rate, but stories and knowledge last a lot longer.

Continue reading...

March 17, 2010 β€” If you automate a process which you repeat Y times, that takes X minutes, what would your payoff be?

Payoff = XY minutes saved, right?

Surprisingly I've found that is almost never the case. Instead, the benefits are almost always greater than XY. In some cases, much greater. The benefits of automating a process are greater than the sum of the process' parts.

Actual Payoff = XY minutes saved + E

What is E? It's the extra something you get from not having to waste time and energy on XY.

Continue reading...

March 16, 2010 β€” I wrote a simple php program called phpcodestat that computes some simple statistics for any given directory.

Continue reading...

March 8, 2010 β€” If a post on HackerNews gets more points, it gets more visits.

But how much more? That's what Murkin wanted to know.

I've submitted over 10 articles from this site to HackerNews and I pulled the data from my top 5 posts (in terms of visits referred by HackerNews) from Google Analytics.

Here's how it looks if you plot visits by karma score:

Continue reading...

January 15, 2010 β€” In computer programming, one of the most oft-repeated mottos is DRY: "Don't Repeat Yourself."

The downside of DRY's popularity is that programmers might start applying the principle to conversations with other humans.

This fails because computers and people are polar opposites.

With computers, you get zero benefit if you repeat yourself. With people, you get zero benefit if you don't repeat yourself!

Continue reading...

December 20, 2009 β€” Programming, ultimately, is about solving problems. Often I make the mistake of judging a programmer's work by the elegance of the code. Although the solution is important, what's even more important is the problem being solved.

Problems are not all created equal, so while programming you should occasionally ask yourself, "is this problem worth solving?"

Continue reading...

December 15, 2009 β€” The best Search Engine Optimization(SEO) system I've come across comes from Dennis Goedegebuure, SEO manager at eBay. Dennis' system is called LUMPS. It makes SEO dead simple.

Just remember LUMPS:

Continue reading...

December 13, 2009 β€” Do you "flip the bozo bit" on people?

If you don't know what that means, you probably do it unknowingly!

Continue reading...

December 11, 2009 β€” Jason Fried from 37signals gave a great talk at startup school last month. At one point he said "software has no edges." He took a normal, everyday bottle of water and pointed out 3 features:

If you added a funnel to help pour the water, that might be useful in 5% of cases, but it would look a little funny. Then imagine you attach a paper towel to each funnel for when you spill. Your simple water bottle is now a monstrosity.

The clear edges of physical products make it much harder for feature creep to happen. But in software feature creep happens, and happens a lot.

Continue reading...

December 8, 2009 β€” Finding experienced mentors and peers might be the most important thing you can do if you want to become a great programmer. They will tell you what books to read, explain the pros and cons of different languages, demystify anything that seems to you like "magic", help you when you get in a jam, work alongside you to produce great things people want, and challenge you to reach new heights.

Continue reading...

December 4, 2009 β€” Do you want to become a great coder? Do you have a passion for computers but not a thorough understanding of them? If so, this post is for you.

Continue reading...

April 14, 2009 β€” Here’s what I’m going to assume: craigslist, Google, and eBay do not have very pretty designs. How can a website be so successful if the design isn’t pretty? My position is that because design doesn’t matter a whole lot.

Continue reading...

while ($brecks_programming_skills < β€˜great’) { write_learning_how_to_program_series(); }

August 28, 2007 β€” I thought today I’d write my first post on programming. I have always been very passionate about computers, but to be honest my programming skills are embarrassingly weak. Mainly it’s because I haven’t spent any time developing them. Although I wrote my first webpage in 1996, it wasn’t until 2002 at Duke that I wrote my first computer program.

Continue reading...

View source