Better HN
topnewbestaskshowjobs
Log inSign up

pesoneto

2 karma · joined Jan 27, 2022 (4y ago) · 10 submissions

Submissions

comment 1y ago · link · parent

My understanding of the Google algorithm is that it is based on named streets. By convention in Utah, the first tuple element is the house number and the second element is the street. But because each element has a post-fix identifier, the order does not matter except for the convention.

So maps will first try to match the entire string entered by the user. Typically, it show a list of possible matches and allows the user to choose one. If there is no match, then the second element of the tuple is chosen and an attempt is made to find this as a name in the street database. But if this fails, maps says what the heck, order does not matter, maybe the first element is the street and looks this up.

In many places, streets are long sections that cross many cities. So Google's street database kind of tosses the city information. So it can end up picking any street that matches either number in the tuple.

Maybe someone has a better knowledge of the algorithm, but this is my best take on it. For Utah, the result is madness.

comment 1y ago · link · parent

I also notice that your username is Uber Man. You probably have some stories to tell about navigation and getting lost.

comment 1y ago · link · parent

Just to be complete, in case anyone pays attention to this and uses it as a specification in a program, there is one more wrinkle.

The units of distance from the origin can vary. City blocks were typically smaller than county farm parcels. So if you are writing a program, you need to look up the units of distance.

Again, this is a real mess in Salt Lake City where the initial smallish city merged with the farm areas south of the urban center.

comment 1y ago · link · parent

Yes, that is what I said in the next sentence. I was playing around, trying to make sure that people think. Like you did!

This problem of street addresses is so deep in the brain that I was making a mistake on purpose to jar the mind of the reader.

comment 1y ago · link · parent

After I posted this, I checked the definition of grok to make sure of my usage. Grok is a word invented by Robert Heinlein to describe the experience of a person moving from Mars to Earth and the subtle cultural shocks experienced. This word fits this situation exactly.

I was born in California and moved to Utah as an adult. The addressing system was incomprehensible at first. In Los Angeles when I was young, my father, a salesman, kept several huge map books in his car. The usage of these was first to look up a street name in an index section and then go to the correct page in the book. Then hunt for the street in the square specified in the index.

There were no such books in Utah. The geography is desert and mostly flat. The Cartesian system mostly works. There are some exceptions particularly as you get close to the mountains. In these cases, one would have to do the California thing. The map you would need used to be in the phone book. So typically you would hunt first for a phone booth.

But this was a long time ago. There are no phone books anymore. And certainly no phone booths. So this is a cultural shift in multiple dimensions.

Salt Lake City is a royal mess. What started out like LA with separate cities have now merged into a contiguous urban area. The origin in cases like this is the county center. So sometimes you can reference the original city coordinates or go with the newer unified system.

But still there is this disconnect in the ways that people think about street addresses. There are deep thought patterns that depend on where you were born.

6.

Utah addresses are Cartesian. Google does not grok

2 points · by pesoneto · 1y ago · 10 comments

comment 1y ago · link · parent

MacFlow by MainStay. The only flowcharting software with an intuitive user interface. Only works on original Mac OS. Don't try it, you will never be happy current products ever again.

comment 2y ago · link · parent

Books have been written about SQL Injection. But in the end, SQL Injection just means that you get a different AST than what was intended.

So the simplest, stupid check for injection is to parse the query and see if multiple STMT's are found where only one was intended.

Better checks can easily be imagined.

comment 4y ago · link · parent

I like this idea. I thought of something like this a few years ago. A search on "sql injection ast" will show that others have considered this also.

One thing I thought of just now was the unlimited power of the database connection. When a programmer sets up a connection, it is usually for fairly simple things. And then injection happens and the connection happily processes that as well.

Perhaps it would be nice to allow the programmer to define the limited scope when opening the connection. A parameter could be added to specify a list of tables and the expected operations. So the programmer could say that the connection is going to access PRODUCTS and the only expected operation will be SELECT.

Closing the connection could also be modified to return the set of tables accessed during the connection along with the operations observed. Another thing that could be returned is a set of AST's detected with the AST in string form. These AST's could then be incorporated into the source code and also passed to the database when the connection is opened.

The database could then reject SQL that attempts to access tables outside of the specified set of allowed tables and operations. Likewise, unexpected queries could be failed.

The beauty of this is that the management of the whitelisted items is in the domain and control of the programmer. Not specifying whitelisted items is possible still and gives the status quo if that is what is wanted. It also empowers and rewards the programmer would really, really does not want to be responsible if things go crazy.

comment 4y ago · link · parent

Sumo Fiber in Utah offers 10G for around $200 a month.

https://sumofiber.com/internet/utah/