Monday, September 27, 2021

John Ousterhout - Philosophy of Design - talk at google - notes



https://www.youtube.com/watch?v=bmSAYlu0NcY

Design is the most important. Yet it is not taught . Can it be taught ? 

Most important aspect of design = problem decomposition

Talent is overrated, practice is what matters

CS190 at Stanford - iterative - write, get feedback, write

1. Students build largest system they can think of in 3 weeks ~ 3k lines
2. Code reviews
3. Write some more code , repeat

Parnas - paper - on criteria to be used in decomposing systems into modules
|_ one of 2 most important papers

Classes should be deep 
- class is a rectangle, top edge is the interface, interface is the complexity cost. so needs to be simple
"classes and methods should be small " leads to 'classitis'. abstraction is important not length
unix file IO . the complete interface = 5 functions.


Define errors out of existence
Define semantics so that there are no errors there, limit places where exceptions are handled

three  examples -
a) Tk - unset a non existing variable - fail silently
b) Not allowing delete when writing going on - correct answer - unix - delete from directory entry, but keep contents so that working process finish, then when last fd is closed throw away file
Worst solution - remove the file when deleted, so now all other processes will have to handle an exception of what to in the middle of their write (what DO you do? how DO you code for such a possibility other than throw an error saying "i have no idea what to do, it's so wtf ,so exiting")
c) Substring index errors- 
 no out of index errors - just substring between my indices and string size. 
*) is it okay to crash - ans OOM errors - sure

Tactical vs Strategic programming
tactical programming is kludges to get system working - it turns to spaghetti very fast.
{tactical = driving to the gate / strategic = driving to little tibet
getting to the gate is important but no point crashing your car to get there}
tactical tornado = usually heroes in companies. but no
working code is table stakes. but it is not enough
go slower initially, invest in zero-tolerance, and strategic programming will beat tactical programming soon
startups are tactical. is a problem
you can still have a great business with crappy code. eg, Facebook

make classes more generic, wham! you get deep classes

Q&A
Hire for slope, not intercept
 |_ people who you enjoyed best in interview
Some languages lend themselves to better design

** secrets, principles no recipes FULL LIST **
- working code isn't enough, must minimise complexity
- complexity comes from dependencies and obscurity
- strategic vs tactical programming
- classes should be deep
- general purpose classes are deeper
- new layer, new abstraction
- comments for things not obvious
- define errors out of existence
- pull complexity downwards

Links : 
https://sive.rs/book/TalentIsOverrated
https://web.stanford.edu/~ouster/cgi-bin/book.php
https://www.amazon.com/Software-Fundamentals-Collected-Papers-Parnas/dp/0201703696

Sunday, September 19, 2021

when i first watched the matrix

 folks only had desktop computers, and that too only the rich

laptops were fiction

nobody had anything to do with cellphones

I used to call home occasionally over a land line

We used to read book for information, and the movers-and-shakers would read magazines to stay up to date, and we would hang out in places and talk and make fun of each other as a way to pass the time.

Space was infinite, and walking to the gate from the hostel took a long time.

the idea of an immersive digital world  replacing reality was extreme, far out fiction, and hence utterly delicious

Gibson said "we live in a mediated world, everything's mediated"

As Tofler said, space has shrunk 

today the matrix (Wachowski ,not Gibson) is a reality, except that it's not the internet or the technology, rather torrent of information pouring out of copper wires, optic fibre and over the ether rendering minuscule our direct experience of reality and the consequent meaning/context/structure-of-the-world formation. 

Hot technologies (McLuhan) have taken over and we are hollow shells .we obey, we consume, we go through the motions, most of us imbibing legal enhancer-drugs ( caffeine, nicotine ) and downers (alcohol) while others go 'beyond', imbibing the illegal ones - charlie, molly, ludes

the monks could drop out, but now meditation has made the list of legal enhancers, so it's impossible to know in a retreat if you're breaking through to the real, or just consuming more manufactured 'real'.

Notes : Understanding Media by Marshall McLuhan



Chapter 1

"In a culture like ours, long accustomed to splitting and dividing all things as a means of control, it is sometimes a bit of a shock to be reminded that in operational and practical fact, the medium is the message."

the evil  starts with Descartes. 
There is no such thing as a straight line in nature, nor are there paradoxes in nature.
a straight line is an abstraction, and an abstraction is a thought object. and the world of man from the time of Descartes has worked entirely in thought objects and thus have divided and conquered the world. 
idea here being a man working on abstractions can scale - imagine the factory floor
a man on a conveyor tightening a nut is not really building a car. the system is .
and thus systems were birthed
 man is not a beast nor the apex predator, though we often say so. he is but a cell
the apex predator today is America. the real America is formless and shapeless, yet it creates wealth for its followers, death and despair to its enemies , all by virtue of its factories ,people and the thought objects they hold. the true power of America lies in factories - not necessarily the ones within its shores. 
And nothing is a truer depiction of divide-to-control  as is a factory. 
the heart-beat of the world we live in today,  is the concept of division of labour. 
and while everybody follows division of labour, this particular avatar involves Labour and Capital as attributes. mankind has been following division of labour forever. the team has always prevailed over the single the lone wolf   from the age of  hunting teams . birth of agriculture started the ever-increasing cycle of cultivation vs population and as a side effect cities developed as intersection points for the different groups of people. 

a though object is not enough to result in action, it must be mapped to feelings and connected to the way of life of the human.  

a concept is a thought object. a thought object is something that you put in your head, and like the matrix, it load a world for you

to divide is to draw a straight line through a thing
to arrange ideas in a straight line also cuts through the clutter of the world

Thursday, September 16, 2021

Watching: 

The Death of Agile 

by

 Allen Holub

link: https://www.youtube.com/watch?v=HZyRQ8Uhhmk&t=16s


had it up to here with Certified Scrum folk

corporations are Cargo Cults, they need a process they can run on instructions and forget about it

there are no Project managers in agile

corporations want a process. 


agile manifesto  has a few principles

1st principle "people and interactions over processes and tools"

scrum is a process. scrum is not agile

to change the process you must change the orgranisation

thumb rule to filter bullshit - agile is an adjective and not a noun. you shoudl be able to replace agile with 'flexible' in any sentence

    - agile says xyz = fails

   - we should be agile = computes

no silos in an agile organisation

no qa director - testing is continuous

no product development group in agile - customers tell you day by day

there are no deadlines in agile. all planning is based on priorities

iron triangle = scope, time ,money

in agile, only scope is flexibly

time & expense reports don't exist

no project management in agile , no middle managers, trust people to do the work

Spotify has 500 developers no middle manager

scrum - just say no. 

extreme programming is made up of larger set of practices- which are  interwoven interconnected complex ways

 - eg testing every 2,3 minutes, constant aggressive refactoring

scrum has stolen from XP the planning game, stand-ups and changed whole-team-room+onsite-customer version to including a product owner instead.sucks

PO is not a customer. he is representative of marketing dept.

XP is incremental design ,code as you go ,with live customer giving feedback. PO simply doesn't cut it

Time-boxing  - waste of effort making 2 week stories

Scrum certification mills harm companies. certification is not a diploma

SAFe is the worst case of this. is designed to be acceptable to corporations

agile is a culture, and it has to start from the CEO

if the CEO doesn't get it , the org won't

trust. no middle managers

culture comes from practices which come from principles -and then values

without values and principles, nothing adds up

basic value of agile is : developer finds out what the customer wants, builds a small chunk of it, gives it to the customer, then iterates on feedback

what agile solves - people don't know what they want until it is in their hands

all agile needs is a whiteboard, 4x4s ,post-its

the electronic version hides in the computer, so is not visible

2nd principle : working software over comprehensive documentation

3rd - customer collaboration over contract negotiations

customer doesn't know what's hard. they ask these things. contract negotiation yields few million dollars  with a new team over 2 years.hence collaboration

ready for change in requirements at any time - responsive

sustainable constant indefinite pace -  deadlines are ways to manipulate folks into overtime. stocked cafeterias are manipulation.  overtimed developers are tired.  cannot produce good code. agile knows this

self organising teams. (cannot do this without trust). 

companies which don't do agile won't exist.

Monday, September 13, 2021

 if you don't have a space all to yourself, you need time

if you are using a shared space for personal work,

 others need to understand and respect what you're trying to manifest

most of the time, at minimum, you need others to at least be on the same wavelength as you , on this matter

doesn't work if you are deep at level 10, barrels coming in heavy and quick, and someone wants you to stop and continue after dinner

 reading about Soddy (thanks RanPrieur) guilts me into not learning/doing more science

time to abolish the fractional reserve system.


When grappling with self-reliance as a concept, it's important to read this

https://web.archive.org/web/20190407070611/http://www.incharacter.org/archives/self-reliance/old-mac-donald-had-a-farmers-market-total-self-sufficiency-is-a-noble-misguided-ideal/

 what's the difference between a mathematician and a businessman ?

as a mathematician, I want the best idea to win, 

as a businessman, I want to win


or is the world held captive by runaway narcissistic type-As who want to win no matter what ?

How to destroy the world ?

1. there is no need to. humans are the apex predator, and are driven more strongly by negative bias than positivity. hence all mankind will be suspicious of each other, build arsenals, jump at shadows, and once the first shot is fired in fear, the remaining will be in retribution

2. there is no need. the usurial world of finance has already surpassed actual ability of human beings to build, grow, serve. as a result,  real world objects have to start going up in price, so as to match planet finances expectation, so as to get a plausible possibility of return. as a result, regular Joes will be caught in a tidal wave of inflation and will have to go into debt for the very air they breathe. this is sadly no longer a metaphor - runaway debt demands factories to be setup at a runaway pace destroying all natural resources including breathable air and water.




the post that started it all (for a while) **
https://medium.com/marius-andra-blog/why-i-dont-eat-on-mondays-9219945cbadb
However, weight training is not part of my life at all yet. And fasting, running etc have fallen off, too.  
Aiming to use easy whole body light cardio routines to step up intensity while maintaining a daily routine (most important),  and asanas to limber up  and ease down, until I can do the hard things.
Currently running literally forces me to crash a couple of hours later.
Nobody analyses the human condition like Ran Prieur does. 
For all my working years, I have run to his writings for solace.  He has a couple of pieces on money as debt and fractional reserve banking that are extremely enlightening in the sense it gives you a simple model that works exactly as the large complex world does, and helps you split the world into sensible causes and effects, and help take decisions better.
But of course, his key attraction to me is the "Civilization makes me feel like sh!t" content.
It's impossible to get folks to talk about this, everybody's in a hurry to cut the conversation short when you touch upon this academically.
https://froogy.blogspot.com/2021/09/i-need-to-feel-like-shit-in-order-to.html  ***

In my Mumbai days, I was living on literally zero personal space, for four years. That explains the addictions, the destructive patterns , general goal-less-ness and inability to capitalise on opportunities and resources available.

I remember a college senior telling somebody the difference between (then) Mumbai and Pune and this has stuck with me since
- in Mumbai, you close your eyes, fall asleep, and then it's morning already
- in Pune, you'll sleep and sleep and sleep and when you wake up,  born anew , it will be somewhere between 12 and 2 in the night.
** the other post was Dr Jason Fung's "Critical importance of time restricted feeding" - got me on to finishing dinner by sunset, as a prelude to intermittent fasting, which never happened.

Whenever I have been between jobs, I have exercised, maintained health, pursued meaning happily. Woke up in the morning cheerfully.
*** this has been especially true when I did Yoga in my year off.  Going back to work was so difficult when I was so peaceful. So I ended up stopping Yoga classes. In retrospect, that was a downward zag to what had been an awesome zig up.
Something about being employed makes on feel guilty for being happy, or for doing anything constructive for oneself. 
The key here seems to be a difference between what we areI am and what we I need to be.
Progress always happens in lots of meaningless iterations that culminate in a large mad headless rush into something. However, all our social systems work hard to limit it. Students who are too good are asked to slow down. That stops their learning, cos one cannot learn at a pace slower than natural - it depletes the experience of meaning.
Derek Sivers wrote "No speed limits" , and I am still wondering how to inculcate that into my life. (The other thing from Derek Sivers is the art/quantity post. There are many, but these 2 for now)
If I were to believe that all jobs are training, and say for example, by doing this Java job, I'll get to a place where everyone will be using Lisp , (teenhood dreams) , then maybe the quest has meaning, and I'll know what to do with resources I acquire on the way, unlike the cash that is sitting in a bank account cos I don't know what to do with it, nor want to spend on myself cos I don't know if I'll luck it again.
First thing to remember is that you and your environment are separate., to remember that  your destiny winds independently. Maybe correlated maybe intertwined, but never combined. Thus independence of identity is maintained.
Meditation doubles down as a key tool at every stage, by examining every personal thought in neutrality. This gives you power over your mental blocks. 
Exercise helps by improving mood and increasing energy. Also health indirectly. The only way to beat addictions is exercise.
Third is a niche where you live, which echoes your values.

Monday mornings are the best. Infinite potential. 
How many apples can you eat on an empty stomach ?
during the week, the heart becomes silted with guilt and overdue tasks and missed opportunities.
The correct way to reset this is exercise. A brisk jog to raise the heart rate long enough to put you into another state. Food will taste better  then. If you are ordering out too much, remember this trick. Stairs and skipping will work also. 

I need to feel like shit in order to work



A year ago I started eating really healthy for a month.  It felt great, I was full of energy.  

But I couldn't stay in my cubicle. I kept getting up to go somewhere, anywhere else, sneaking outside for fresh air and sun. 

Work suffered. 


When I'm unemployed I eat well, get daily exercise, adequate rest, and I'm generally healthy and feeling fine. 

When I work, I don't. It's not that I don't have the time or the energy at the end of the day, because I totally could keep up with the healthy stuff. 

It's that I need to feel like shit in order to work.


source : https://www.ranprieur.com/archives/019.html

Saturday, September 11, 2021

Every technology contrived and 'outered' by man has the power to numb human awareness during the period of its first interiorization. 

-- McLuhan, Gutenberg Galaxy 


Civilization advances by extending the number of important operations which we can perform without thinking of them. 

-- Alfred North Whitehead, Process  & Reality 


this leads me to conclude 

that every advanced civilization is utterly insensitive 

and therefore perceived as ruthless by those it is incumbent on .

this would match what the original inhabitants of the colonies felt about the folks coming over on steamships


https://quotepark.com/authors/marshall-mcluhan/man/

https://quotepark.com/authors/alfred-north-whitehead/

Tuesday, September 07, 2021

why clojure trips me up


this ^ is the documentation for Clojure's sort-by

however ,  you can also sort by the values in the  map, if you pass a map as input to the function.

this is given as an example further down


This throws me off.  What is val 
Apparently it's another function in the Clojure canon/pantheon
How would I know ? 
it's given in the example
How would I know to search in the documentation again ?
..... some familiarity is needed

The keyfn also  supports a whole lot of behaviour such as juxtaposing key1,key2 pairs, sorting by key , sorting by count and a whole lot of others which aren't really part of the documentation of the function itself.
You need to know the rest of the documentation to -get- these.
These seem par for the course, and are probably what fluent programmers would use. Except it's a recursive way to get there.

I came to see the function usage, like a dumb java developer, and got plonked with a short story on sort-by usage patterns. 
That's a learning curve too steep for someone who came expecting some constants or keywords to plugin to my function and get some documented behaviour variation. 

Problem is in Clojure, opening each blackbox is just as much effort as it is to turn a page, but then your mind has to load that function definition too,  and it becomes too much.

I am still struggling with the paradigm shift, ie, constants/keywords etc are just functions and vice versa.
Java typically does dispatch on constants or enum keywords - aka an if -else clause.
Clojure (and functional programs) use functions to decide dispatch..  a function is a constant and a  thing, as opposed to a machine's maw like I imagine in Java

I expect these complaints will disappear linearly with lines-of-code written, and I'll not be confused by seq anymore

Video notes:

Clojure is a data processing language.

The language mirrors the structure of data

(being a homoiconic language, it feels like the data is executable)

(Lisp is ListProcessing is the closest to a Turing machine )

(homoiconic - Freddie Mercury)

Can we do a whole web app with just clj-http, clj-sql etc ?


References:

https://clojuredocs.org/clojure.core/sort-by

https://www.youtube.com/watch?v=C-kF25fWTO8&t=1364s