3D Fractals via Mandelbulber

I was scanning recommended videos on Youtube when I came across this one:

[youtube=http://www.youtube.com/watch?v=QhMdL4kSnsg]

 

I had to see this.  It was amazing.  I was hooked.  I had to find more. 

That led me to this program: https://sourceforge.net/projects/mandelbulber/files/Mandelbulber%20v2/win64%20build/

Which I then ran, and tinkered with.  Result:  I rendered two/three desktop backgrounds for myself.

orange fern brushed metal
brushed metal-aliased  

At 2560×1080, the first two took about 15 minutes.  The third one, which looks like the second one, was actually rendered at 5120×2160, and then scaled down to 2560×1080 (simulating an anti-aliasing of 2x).   However, it .. came out different:

image

image

There are more holes, in the one with higher resolution.

This is because

a) Mandelbulber dynamically scales fractal complexity as it raytraces, and

b) the model that I chose, i chose one with “negative scale”, which I think means, the fractal works by taking chunks out of space rather than by adding chunks into space. 

I gave up at this point.  There’s an unlimited investigation that could happen, and my curiosity had been satisfied.  I could make desktop wallpapers of any resolution.. but I’d need to search for something cool to take a picture of.  And there’s so many variables.

I did find another VR flythrough, albeit i have no VR goggles, so someday I want to see this in stereoscopic:

[youtube=http://www.youtube.com/watch?v=kOu3_tmHxu4]

 

Be aware there’s a lot of material editing stuff that you can do as well – which can be a bit hard if you haven’t dealt with materials (specular, texture, etc) before.   Oh, and dynamic volumetric fog – lots of computation even at 320×200.    Like I said, unlimited time could be spent…

Or you can oogle these:

http://www.mandelbulber.com/gallery_page1.php

image

(screenshotted so you can see how beautiful before deciding to click the link).

Inventory of Projects

I’ve been meaning, for a while, to put together a spreadsheet of the (software) projects I’ve worked on in my life so far.   The sheer number of them is staggering.

The thought was I could put in enough columns so that .. an interesting taxonomy could emerge. 

Its also one of those things where, I never thought the list would get so large that I couldn’t remember them, but.. here I am.  I guess 26 years of paid experience will do that to a person.

I Started It

I tried to do that for a bit – here’s what I got:

https://docs.google.com/spreadsheets/d/19ivowzqQJiPrMVk8rAfHbZ-cf_G6tqmQAzqYIW1sc00/edit#gid=0

image

The columns I have so far are:

  • Name
  • Year(s) – turns out some of them extended over multiple years.
  • Employed by + Project For – working at igNew, my project was for a client other than my employer.  But before that, these were the same.
  • Implementation Details – this was pretty hard, to figure out what columns to use:
    • Language – Its mostly C#, but if I go back far enough there’s some Java, Perl, Clipper, etc as well.
    • UI – technologies related to UI stuff
    • DB Backend – technologies related to database stuff
    • Host Platforms – I was trying to figure out how to say Asp.Net MVC vs a Windows Service.
    • Additional Technologies – I think maybe EF + Dapper need to move to DB column
  • Management Details
    • SCM used.. this feels like an unnecessary column, who would ever want this info?
    • Unit Testing / Mock framework – if sorted by start year, can see how this becomes important
    • Integration Testing – as I think this is super important, putting it out in its own column.
    • CI/Build strategy – or lack of it – how we went about running the project
  • Project Management Details
    • Roles
      • Engineer = “thought about how to do it” + “did it”
      • Lead Engineer = “mostly all me”
      • Project Manger = “updating the Burndown” + “Communicating estimates + schedule”
      • Ops Support = “things broke in Prod.  Figure it out.”
    • Slices  – If I worked with a team of people, then these are the bits that I worked on.
    • Proud Of – this is probably the best part of looking back.
    • Coworkers + Contacts – I’m going to have to go look up many names for Contacts.

What Now?

There are so many projects!   I put down 11 tonight,  I think the list of paid things is..  probably in the 40’s? 1-3 per year, depending on role, and then add in another 30-40 of fun things?

I guess I could make a list of all the projects I could think of first .. vertically .. going through each Job.

I could (and will!) also add in all the for-fun projects that I’ve done.  

But Why?

Simply put, this is to battle Imposter syndrome.   Also, in my job, I’m undergoing a role shift – where I’m taking on more Ops and Maintenance type work – it feels like a good time to look back at my career as a software developer and take some stock of what I’ve accomplished so far.

The other part of it is, … my resume.  I don’t need one at the moment, but every time people talk about keeping a resume updated … the level of detail involved … gives me anxiety.  So the thought is, if I have this spreadsheet out there – my resume can become more of “who I am” and “what I care about” and shove all the detail crap to this spreadsheet.

Updates to twit-sort

I am currently on vacation!  In Florida!  We drove!

I took the opportunity (in the early mornings / late nights when everybody else is asleep) to work on some code that I wanted to update – I don’t normally get time to do this.   Its my twitter-reading app.   Which only I use.  But hey, that’s fine, I haven’t tried to market it.

Changes

Change #1:  I kept seeing “…” with truncated tweets.  A little research led to some interesting stuff — basically following retweets to get down to the original tweet to get the text from there.

Along the way I tried to build up a “who quoted who” breadcrumb:

image

The code is a bit wonky:

image

However, its confusing – many people (or clients) retweet without actually having a retweet link.  There’s “quoting” which is different ..  eh. whatever.  If I’m given it via the API, passing it through, figure it out later.

Change #2: I surfaced the like count and favorite count, as well as a link per tweet to open the tweet in its own window (as hosted by twitter). 

image

Complications

I have the code in github, which is public, and I don’t want my access keys and tokens and stuff checked in there.   So, I had to fudge around a bit – this was my solution:

image

  • I created a branch with all the passwords and stuff, and worked from there.
  • Once it was done, I either did a rebase (with cherry picking) or a direct cherry pick to move commits over to master, which I pushed up.

Granted I could use my azure visual studio hosted git, but I wanted the code to be visible / usable.  So.. if anybody has other ideas of how to do this better, please let me know.

What Next (with this project)

Not much else I can do with this in its current codebase.  I could certainly make it prettier, but .. eh, that’s not me.

If I had unlimited time, I’d rewrite it – make it so it did all its fetching and filtering and sorting locally (in javascript).  I could get a LOT fancier then – things like pulling out hashtags into groups, etc.  Maybe adding some sentiment analysis things.

However, I have so many other projects on the burner.. this one won’t make it for a while.  My need has been solved, so there’s very itch here to scratch.

The url of the site:   http://twit-sort.azurewebsites.net

The code: https://github.com/sunnywiz/twit-sort

Time Inventory: 1 week in February

After listening to https://www.relay.fm/cortex/44, I decided to do another round of time-tracking.  I had done this twice before —

https://geekygulati.com/2012/06/28/where-did-my-time-go/

https://geekygulati.com/2014/06/04/time-use-may-2014/

This time, I used a new tool, https://www.toggl.com/app/timer.  More on that below.

Results

image

imageimage

  • My time is evenly spent working, and sleeping, and “everything else”.
  • Everything else – “entertainment” (youtube, twitter) took the most time. 
    • This is a direct reaction to the political climate right now – this was me staying glued to my versions of news sources, to get a feel for “what’s going on out there”.  Not necessarily healthy.
  • Then Family, and being around other people
  • Then Admin, which is chores and self-care thing.

Not too bad.   The “Entertainment” is too large, but otherwise, this feels solid.

The way that I tracked it this time, if I was driving to work, that was “work” time, but tagged with driving.  So, I could narrow down to just the “driving” tag and see where all I was driving on the behalf of:

image

  • As expected, most of the driving was to work.   My 30 minute commute is represented accurately.
  • Lots of driving for “social” reasons – to have breakfast or lunch with friends.
  • Recovery and Teaching are next – also good.
  • Nevertheless, 9.5 hours in a car during the week.  Of those 9.5 hours,  3 hours were logged as “listening to a podcast”. 

I don’t always want to listen to a podcast when I’m driving.  Sometimes, I prefer silence.

I also spent 11 hours and 13 minutes engaged in “eating”:

image

  • Thanks to notes, I can see what I was eating, and who I was eating with.
  • I spent around 2 hours eating by myself (at my desk, or drive through).
  • The rest of the time was split between friends, coworker-friends, and my family.

Toggl

I did NOT like it.  For the purposes of doing 24 hour coverage, it was NOT easier to use than Eternity (an iPhone App).  However, it was definitely better at reporting.

Specific reasons of dislike:

  • Starting a timer on the phone, then stopping it on a computer – timer kept going on the phone, throwing things off.
  • Very hard to adjust things AFTER the fact.    In Eternity, it has “locked” times so adjusting end of one thing adjusts the start of the other, etc.  With a calendar display where i could just slide times around, rather than having to enter every digit. twice.
  • Gap detection only possible using the website client.   And then, when I detect a 6 hour gap from 4 days ago…  it took way too many clicks to try to get time entered.

I would say Toggl is more directed at business-type things – not personal enthusiast things.    And that’s fine.  

Changes to consider for the Future

  • I need to get my Youtube / Twitter / News intake, more under control.  
    • We might be doing another experiment – getting rid of internet at our house – and I might be downloading “what do I want to watch” to my iPad while at work, and further delaying what I watch.
    • I think I overkilled with watching Colbert + Noah + the other guy.  I think I’ll rank Trevor Noah at the top for me, I don’t need to see all 3 folks’ interpretations of what happened that day.
  • I have to get exercise back in there somehow.    I don’t yet know how.   Probably less being social?   Combine it with family?  Here kid, let me strap you in to my chest and run on a treadmill.
  • I didn’t do much (any) cooking this week.  Previous weeks, I had 6 hours of cooking in there – at least.   However, that’s also quality family time for me.
  • I also need more personal, not-scheduled, do-whatever type time.  Places where my creative side can come out.  Like writing this blog post.

Good news – I have a week of vacation next week.  Help me juggle and resize things and try to come up with a plan.

Levels of Being Freaked Out

flowchartoffreakedoutness2The events playing out at the airports freaked me out over the last few days.

I realized that my security instinct was kicking in – I’m not directly threatened – but my instinct is still kicking in.  Okay, acknowledged.

I started thinking about all the “threats” that my system was reacting to, and .. after sharing them with my sponsor, realized, I could zoom out and get a perspective.

Here is my perspective (click to zoom in):

 

 

Specifically, there are two sub-sections which I need to zoom in on:

image

This is the “well, either things will go to shire or they won’t, and as much as I can figure, I should take actions to affect the outcome, and me harm none.” branch.

Secondly:

image

This is the “catastrophic failure of society” branch.

I had to think pretty hard about the green arrow – this is related to me choosing to arm myself or not (in a way).  There’s a subset of “short term society crash” vs “long term society crash” where my answers are different – I think I would arm myself to “keep my peace and order” until society order is restored.  I don’t know about long term crash.

Okay, good.  I have a framework in which to rest my fear.

Now What?

Society hasn’t folded, so I guess I’m at “Discern Actions” stage.   There’s actually more to it than that:

Awareness

This is the tumultuous part.    This is when the inputs that are coming in the eyeballs cause discord in the brain.   Best thing I can do at this point:

  • Don’t shut down, let it in.  Need information for the next stage, knowledge of what is going on.
  • (at least not me) don’t react in indignation.  Indignation may be short term good for my emotions, but its not a long term strategy.   Good news: plenty of other people to carry the indignation immediate action torch for me.

Acceptance

  • This is the point where one has a decent enough perspective of what’s going on, that one understands the system that is in play.  Now the better vs worse actions are visible.

Action

  • Act without expecting outcomes.

 

Thats all I have for now.

Blue Apron: roasted cauliflower pitas

Made my 3rd of 6 Blue apron meals (last shipment arrives Tuesday).   It went rough, but I figured out some things:

  • Definitely check out the recipe online:  https://www.blueapron.com/recipes/roasted-cauliflower-pitas-with-purple-potatoes-spiced-yogurt
    • They have little videos showing easier ways to do things – like – peeling carrots.  Helps with the overwhelm as well.
  • Print out the recipe from online.  I did a photocopy of the recipe in black and white and crossed things out as I went, if I had printed it out, it would have been easier to read.
  • Get appropriately sized bowls for everything ahead of time.
  • I probably need more salt and pepper.  I swear .. put in the taters.  salt and pepper.  add oil.  salt and pepper.  remove and put in bowl add lemon.  salt and pepper. 
  • Lock the camera down with magnets (or use a better camera).  However, dropcam is so convenenient .. just do stuff and create the timelapse later.  No editing.  But yeah, it would be nice to have a really high res timelapse.  Could do it with my phone, I guess..   (video nerd came out, sorry)

Once again, the recipe took 2 hours from “decision” to “prep” to “cook” to “plate” to “eat” to “clean”.   So about the same as driving half an hour to a restaurant.   I did not have my wife’s company this time.   Would have been cost:  $20.

The food was delicious!  I think they’re growing on me. 

Timelapse:

[youtube=http://www.youtube.com/watch?v=IbuCSCNZynQ]

My attempt to do the moonwalk in slow-mo didn’t come through quite right.  (Its during the purple potatoes).

Blue Apron–Timelapse + Minor Analysis

I am investigating different ways to go about eating.  First up to try: Blue Apron.

There are a gazillion reviews of it, so I won’t focus there; instead I’ll go for my reaction.

Timelapse

First, here’s a timelapse of me preparing https://www.blueapron.com/recipes/potato-artichoke-quiches-with-romaine-orange-salad .  The time covered is from 5:54pm to 7:15pm or so – from the time my wife picks the recipe to me plating the food.

[youtube=http://www.youtube.com/watch?v=GptVmizTcIA]
video caption here is what i entered

Analysis

Going through the video at normal speed, and inventorying myself:

Stage Their Est Me Comments
analyze recipe so I don’t miss anything. (none) 5:56-6:04
8 min
The text is pretty scrunchy, so I convert it to a flowchart of sorts.  I don’t refer to the flowchart again, but connecting all the things in a flow helps me consider everything.
Get Hardware (none) 6:05-6:08
3 min
Pots, pans, salt, pepper, oil, etc… and bowls for ingredients.
Unpack food (none) 6:08-6:11
3 min
Sorting 2 recipes, I had already made one.
Arrange (none) 6:11-6:13
2 min
I wanted everything easily visible and available in its own bowl.
Prep 15 min 6:13-6:31
18 min
I slowed down on the orange, I think. It was frozen-ish and my hands got numb.
Cook: 35-45 min 6:32-7:14
48 min
Broken down further
  Taters 12-13 min 6:33-6:46 13 minutes
  Taters+Art 2-3 min 6:46-6:49 3 minutes
  Mix with Egg   6:50-6:52 Everything till starting to pour them in
  Pour them   6:52-6:53 I was afraid of missing.
  Bake 18-20 min 6:54-7:14 20 minutes.  Thank you Timer.
  Salad   6:58-7:01 (Extra Salad Chopping)
Plating   7:14-7:16 2 minutes
(eating) Not included in the time lapse.
Cleanup 7:35-7:44 Unload + Load Dishwasher, Clean stove.

So end-to-end time with no technical debt: 2 hours.

It was quality time, with my wife hanging in the Kitchen with me as we chatted about stuff.

So Is It Worth It?

To try to analyze it more objectively, I think its a 3-D plot.

For Health Level, its a bit arbitrary.  1= bottom, 2=mid, 3=good.  Circle size = bigger = healthier.

I did not include Tastiness.

   

image

image

The labels overlapped, its in the bottom right of the grid.

So,

  • Its healthier but much more time-costly than going to a place like Noodles & Co which is 20 minutes away.
  • Its better than costlier long-wait-restaurants like Mikato. 
  • Its about the same as driving 40 minutes to the Whole Foods to eat at the buffet there.
  • Amortizing the cost over 4 meals, its probably the same as going to a grocery store to shop, and then cook, something healthy .. maybe.  I don’t have actual samples on this yet.  I will soon.
  • I put Soylent on there. 
    • Assuming you don’t have an adverse reaction (I do)
    • and you don’t have objections to the idea
    • its “perfect” nutrition, very fast, and at fairly low cost. 
    • Its not friendly with my diabetes, either.

When viewed through this lens, I guess its okay.  Its not earth-shatteringly better, its just.. more tuned. 

Summary (so far)

You have to like, and have the time, for the cooking.

If you like cooking, and hate shopping, and like trying new things, it would be PERFECT for you.

For me, cooking is okay, the hard thing for me is the time.

I have one more recipe from them to try, then its off to Green Chef or something like that.

Year End, Backup, Archival

image

 

Because I have the time available, rather than just reacting, I’m trying to plan what I’m going to do with my various sources of information.  Its on my head to keep them backed up (in case of data loss or service loss) and archived (long term storage, and also dealing with service loss).

There were too many things!  I’m going with “resilio” (formerly bittorrent sync)  as my offsite, in-my-control backup (if it dies, the files are just plain old files on a hard drive), but i still need to get my stuff from Dropbox / Google Drive etc to resilio.   But how I get the stuff there?

So I added a Risk and Importance column where low numbers = don’t care and high numbers = care, multiplied them together, and got a priority.

Starting the copies while I go do other cleanup stuff around the house…

Lava Lamp

image

When i was a child, I used to drool over the things you could get for points in the back of Marvel comics.    One of them was a Lava lamp.

My coworker Mike offered one up as part of moving.  I snatched it up.  And I’ve.. been obsessing about it.

The result of my obsession:  using my iPhone 6 to do a Time-Lapse, with a lamp in the background providing additional lighting.   In 3 Instagram videos:

 

1. Lava Lamp Cooldown:  https://www.instagram.com/p/BOoAqRDDPmu/?taken-by=sunnywiz

When heat is removed, it very quickly loses convection.. stuff is still liquid, but doesn’t move as much.  As that cools, it seems to shrink a bit.  (Although, I don’t know that the water displacement changes … i didn’t think to check that).   A cat comes by to check things out later.

2. Lava Lamp Warmup Part 1:  https://www.instagram.com/p/BOoMoN4jf9N/?taken-by=sunnywiz

The liquid at the bottom builds pressure and pokes holes through the solids above it, causing some geysers and debris.   The video ends where you can see the whole mass melting a bit.

3. Lava Lamp Warmup Part 2: https://www.instagram.com/p/BOoMuwLjOss/?taken-by=sunnywiz

More and more of the wax melts and starts playing into convection.  Once you get convection, the melting process speeds up (I think).

 

Looks like the heating side of things is somewhere around 127F, and the tapered area (from the bulge up) is 106F all the way up – I think that’s why its tapered like that, so that the heat loss is distributed evenly?

a Rubiks Cube, a father, and a son.

Note the lowercase f and s.

My father showed me how to solve a Rubik’s cube.

There were many things sub-optimal, perhaps, about my nuclear family of origin; however, some things that went very well:

  • In the 1980’s, when the Rubiks’ Cube became a thing, lots of people were writing books on how to solve it.
  • Not a lot of Maths books though. My father (Sat Pal Gulati) always wanted to be famous, respected, known, and he decided to write a maths book about the maths of a Rubik’s cube.  This was probably 1984?
  • He showed me, by example / osmosis, his solution..
  • .. which gave me a mindfulness of patterns.
  • This mindfulness of patterns has helped me in my programming career and in life in general.

Or maybe, I was always prone to pattern-recognition, and this was one of the first ways my mind used that skill.

My father was never able to publish his book – he finished it, and I remember him working with some printers in India to get it published, but he only printed a few (100?) copies, and never got a distribution channel to sell it.  But he was very proud of it, I think.   I would love to get a copy of it, but I don’t think I can.

My son enjoyed playing with a Rubik’s cube.

I’ve shown off my Rad Rubik’s Skills every now and then – mind, I’m not a speed solver.  Best time so far has been 1:58, usually more like 3:00.  Mostly as a party trick, I don’t own a cube of my own at the moment.

At a family gathering, my wife’s sisters’s husband’s brother’s son had a cube – and it was a big topic of conversation for the evening.  I showed off my inner child’s skills (thank you dad).   Later in the evening, my son (who is now a young man, on his own, with a son of his own), picked up the cube.. and I could see his gears turning, his fingers ruminating.  My heart melted.

So, for Christmas

I am investing.

I am investing in the availability of patterns for young (and not quite as young) minds to grab on to.

I am investing in my inner child who loved this stuff.

There’s a beauty that I cannot describe in working with these kinds of puzzles.   Its the same beauty that I see in Maths that people either get, or their eyes glaze over.

Just waking up in bed this morning, my mind started playing with a 4x4x4 cube, and I realized how the solution is the same as the 2x2x2 – the inner edges are the same as an inner 2x2x2.

What’s this Pattern / Solution?

Jade asked about being able to solve it, and I’ve been thinking about it.   I think there are some realizations that add up:

  • First you have to be able to see the “edge” pieces from the “corner” pieces, and the relationship to the “center” pieces.   Pieces are not in place till all the colors match their respective centers.
  • Then, given you have a face that is already solved,  you can find two moves:
    • one move A will remove one piece from that solved face.
    • a different move B, to put that one piece back in the solved face.
    • your solved face is still solved.
    • Sorry, we’re going into Maths territory here by giving things names like A and B.
  • Then, you study the effects of A+B on the rest of the pieces
    • some pieces swap with each other
    • some pieces go for a 3-way swap with either other
    • sometimes pieces rotate in place.
  • Now think about mirrors.  So if you do a move on a left side, vs if you mirror it, and do it on the right side.
  • Now think about (A+B) + (A’ + B’)  (yeah, I had to jump into Maths.  I could make a video if someone asks)
    • Some things will cancel out
    • This ends up moving a few pieces with surgical precision.

I wrote the above before I found the links below .. its so much easier to show.

What Specifically did my father show me?

My father’s system has you solve the top face first, and then work on:

  • Bottom corners placement
  • Bottom corners rotation
  • Bottom edges
  • Mid edges placement
  • Edge rotation

Pattern 1: To position and rotate corners

Click on the bottom row of buttons to move the cube around, S to stop rotation, R to reset rotation.

  • A+B: https://rubiks3x3.com/algorithm/edit.html?moves=rDRDFdf
    • A = rDR moves the Yellow-Orange-Blue corner piece out
    • then move the YOB piece back in with B = DFdf
    • omitting a final d .. better for combining below
    • Yellow face stays unchanged
    • White Corners:
      • Red-Blue unchanged
      • Orange-Green and Orange-Blue 2-swap (with a rotate)
      • Red-Green rotate (rotations are always in pairs, the other part of this rotate was in the Orange-Blue)
    • Use this move to position corners, don’t worry about rotation.
  • A’+B’: https://rubiks3x3.com/algorithm/edit.html?moves=LdldfDF
    • Same as above, but mirrored.
    • Same effects, except a different piece rotates.
  • A + B + A’ + B’:    https://rubiks3x3.com/algorithm/edit.html?moves=rDRDFdfLdldfDF
    • The two front bottom (white + orange) corner pieces don’t move.
    • The two back bottom corners (white+red) rotate so that white ends up on the back.  Ie, whatever was on the L+R is now on the bottom.
    • Use this move to rotate corners.

Pattern 2: To move things from the middle to the bottom edges

Pattern 3: Moving Edge pieces around

Rotating the cube so that the offending middle pieces are.. well, you’ll see:

Pattern 4: Rotating Edge pieces

This one is so simple, yet .. amazing somehow.

And that’s it.  That’s all I had to remember to get the cube solved.

The same moves apply to solving the 2x2x2 – there are no edges.

And this morning I realized it would solve the 4x4x4, 5x5x5, etc, as well.

Thanks Dad.