Saturday, October 31, 2015

Thinking Like a Computer

This is still a WIP, will add some specific results later...

While we focus more on getting computers to think like us (but even better), I think there are a few things we can learn from them.

The way I see it, the brain is like the main parts of a computer: CPU, storage, memory.

However, the space in our heads is more limited than even the space available for these in a laptop. Smartphones don't do much themselves... they rely a lot on the Cloud, basically a massive supercomputer.

So this is how I see it:

Brain

  • CPU
    • Critical Thinking/Evaluation: uses the below to make decisions
    • Random Access to Storage and Memory: responsible for causing thoughts to suddenly pop-up; some useful, some not, others become useful when Ideas Engine puts them together
    • Recall/Search/Indexing Engine: algorithms, heuristics, data mining that can run on Memory and Internal Storage
    • Ideas Engine/Subconscious: utilizes all these in the background to create AHA!s
  • Memory
    • Fast access like a HashTable
    • Short-term: things may not stay long and get lost randomly; forced retention takes a lot of energy
    • Working Memory: things you need to know, use constantly, and handy for getting whatever you're working on done quickly
    • Certain knowledge can be loaded and found from long-term but may take time (i.e. syntax and programming style in a specific language)
  • Internal Storage (long-term memory)
    • Long-term 
    • Retention is uncertain
    • Mostly random access so finding important things are slow
    • Sometimes feels like a bottomless pit but again recall and retention is slow and uncertain

I've emphasized what I feel are some key traits and the CPU does a lot of them. More importantly though the amount of space for each is dynamically allocated, particularly between Memory and CPU.

So what I think I've discovered is:

Shrinking the Memory and using the space to expand and strengthening the CPU is leads to increased random thoughts and also more talking to myself. These lead to more random ideas and some of them are quite good... solutions, blog topics, talking through problems and hypothetical scenarios.

So how do I shrink the Memory?

Well Working Memory is important but again you don't need to and cannot remember all of it.

Instead I hold links. Similar to a computer, we have External Storage (paper, computers, smartphones).

So basically write things down; some examples:
  • I have a blog idea? Write a brief summary somewhere and just remember that I have an idea and where I put it (putting in the same place helps a lot because then it goes into long-term)
  • Some new system I build is fresh in my mind (Memory), but am I really going to remember it 6 months down the line? More importantly, do I need to waste this space holding it? No... write some simple but clear documentation and create some cheat sheets. Finally, I create a link and use the freed space for something else
  • I can't remember the 100 different usernames and passwords! Then just use single sign on like Facebook, Google, a password manager, etc
By doing this, I can shrink Memory by offloading the actual data and just holding links which I can easily remember and cheaply store. Hey, found some free space!

Now just a short note on Internal Storage. As I said above, it is somewhat like a bottom-less pit, very fuzzy, and really just random access. Think about questions like this, when were a kid, when was the first time you... They usually take a while to answer and it's probably the CPU's Search Engine at work. Similarly you know when after interviews and tests, you go: "Arg.. I should've ..."

So now that you've freed up a whole bunch of space, grow your CPU to fill it up!
Especially the Search Engine and Subconscious. This is again why I feel thoughts are now flying around. These merge into ideas and solutions, allow me to rant for hours, and summon random facts that I use to... well my friend knows.

Basically all I have to do is say "I am looking for something like..." and after a few seconds, days, or weeks... BOOM! AHA! result/solution found!

So here's some tips... I may edit more later I was just thinking about these... randomly.

To build grow your Random Recall Engine (and I think this is like the best part):
  • Blog, give speeches: As you can see, I can ramble longer and longer nowadays. Why? Because when I fire this engine up, it just keeps going and going jumping from one idea to the next. I am pretty sure this is how good speakers like those on TED give their speeches: Put in a main idea and hit Start
  • Argue with and persuade people: similar idea, you need persuasive reasons with a (Search( Engine you can find them quickly
OK I am cutting it a bit short but my Engine/CPU is getting tired... maybe more on this later and clean up the ideas because... well I am pretty much just streaming whatever comes up now.

EDIT:

OK so for personal things I tend to offload them on my phone, I have a few reminders and notepad and these are own the front page... along with common apps. Yes easy to find is another way to reduce the amount of energy spent on not so useful things. Less energy here, more for creativity and problem solving.


Whenever I suddenly think of something I just pull out my phone and write a note. These screenshots are the results of one of these. 

You can also see the idea of heuristics and how they are data mined from you Storage and Memory is also something that popped into my mind... I think while making lunch.


Alright... I am dry for now... maybe more to come...

Why Modularity?

Originally, I wanted to focus on how modular code design increases reusability (thus reducing code duplication) and leads to new ideas… but really it applies to many things. So let me talk a bit about that first.

You probably remember as a kid, you played with Legos.  They came with basic small pieces (usually… I think there are bigger ones now), and you put them together to create whatever you thought of.

Similarly in school, at least in the early years, you learned the basics which were used to build/understand more complex ideas.

Now back to coding. Recently, this has been a growing movement, and I think driven by multiple forces but all really address the same thing: inter-dependencies in monster code (henceforth known as MC).

Agile
MC is hard to change without accidentally breaking some functionality, Also boundaries between components are fuzzy: many many "hidden" relationships that don't show up until something (in Production) causes it to blow up. This means more time spent testing and debugging.

Clear Code
MC usually does many things…  at the same time…  which means the whole logic is hard to understand and debug. Humans' minds can only keep track of a handful of variables, especially if they are called x, y, z.

Testability
MC is tightly coupled and have dependencies all over the place that impact results… or even whether you get one or not (tightly coupled external services).

So then these need to be tested manually… again huge waste of time. I commonly hear stories of releases taking whole days and a team of people because the testing is all manual and it is very hard to automate… culprit?  MC and poor systems design.

Small generic code is usually fairly easy to decouple,  just stick an interface between them. In fact, you can then use a mocking framework to "mock up" an implementation for unit tests.

But actually Testability needs to be designed into the system and usually that leads to... modular components. That's also why we need to move to TDD where modularity becomes a basic requirement.

Reusability
Creating independent modules means that you can take existing, well-tested code and plug them into other apps. This is probably the main reason for the Apache Java libraries that address a lot boilerplate code. Similarly, I have created my own libraries that I use in a lot of my C# apps.

By reusing code, development is faster. Moreover, you are not wasting time and energy writing something that you already implemented 6 months ago. Or copying the same code snippet 50 times when you need to make a bug fix or improvement. And I doubt you will do much of the latter with the amount of "work" involved. Generally, you want to follow DRY: don't repeat yourself. Again TDD should help: if you're writing a similar test, maybe you should look at an existing module...

This time and energy saved (along with that from automated testing and deployment) is usually where new ideas come from.

You can also take a handful of them and write some new code that puts them all together in some new way and…  Voila! You just quickly (and cleanly) solved a really annoying problem or created a useful new app/solution.


Friday, October 30, 2015

I'm Sorry... I am having a bad night...

I think I just posted another 2 rants about how technology companies are like idiots these days... oops I did it again

Anyway, I will probably go back to normal tomorrow, I'm just all fired up now about this so let's just get it over with...

The Problem with Metrics... Listen Up Google...

One of the complaints listed here, What is the worst part about working at Google? is an obsession with metrics. First of all, while data is nice, it's still kind of like statistics... depending on how you collect it, you can make it say almost anything.

So most likely you are going to go by... majority rules. Let see, didn't Apple say something like:
Consumers don't know what they want?
But there's usually a small group of people, a super minority that does tend to know what they want. And well maybe they aren't exactly consumers... they are more like technologists... without the super smarts to get into big tech shops... or just the cramming needed to get past the interviews or have any interest in joining...

But they tend to be self-identifying and very collaborative and helpful when asked or given a chance to speak. In fact, they/we are the ones submitting most of the bug tickets and feature suggestions. But what do we get back? Nothing... It seems we just end up yelling into the mountains.

Google...

You're apps are draining my battery and data.... unnecessarily. We've been yelling at you and talking among ourselves for years... All you need to do is put in some settings so we don't need to forcefully kill and block them.

Also, the Gmail app is a mess... The web version is actually much more functional feature-wise... but anyway, I think I have told you guys repeatedly already so you want the details? You come ask me.

But this may also have something to do with your engineers' tendency to always chase shiny new things and because they seem to be zoomed into some challenging algorithmic problem rather than trying to deliver a high quality product to users... hey why don't you hire some full stack developers instead of massive teams of specialists...

Anyway, why don't you put some more focus on the minority that actually knows what we and probably everyone else wants... rather than putting your attention on a majority... that don't know the status quo can be changed until it is.

I Hate Windows 10

This is a sudden post but I've had enough of Microsoft's aggressive tactics. I am someone that wants full control over my devices and ABSOLUTELY HATE NAGGING...

Windows 10.... full of nagging that can't be turned off.... Up to Windows 8.1... I could at least get it to stop... Windows 10? NOPE....


  • It won't stop asking me to use Edge and all their other "awesome" apps... even after I told it NO!
  • I can't tell Windows Update to go away for good... it still wants me to at least schedule reboots... NO is NO.... I will reboot when I feel like it...
  • Now that I want to shutdown... since I am now not busy and would like the update installed...  It just says shutdown... What's the update?  It seems I need to tell it to Restart...  through the Check For Updates app...  All I can say is... Are you people idiots? 
Probably more to come...

Saturday, October 24, 2015

Backlog: The Enemy of Starting and Catalyst for Procrastination

OK this should be a short post.... unless I somehow get into RANT mode... which may be a topic of another post by itself actually....

But yes don't you often get the feeling when trying to start something and then you feel resistance. You think about all the work you would have to do... and that it is indeed work as opposed to play. Hey another topic! I think I am back on a roll now! 

Crap... Just when I was getting started... time for dinner...

Updated 7:30PM Alright I'm back... 2 hours later
... Rebooting... Figuring out where I left...

So you start thinking about all the work you would need to do. Here are some examples but I am sure you can think of more:


  • Blogging: I have another 5 post ideas... this is going to take a lot of time....
  • Taxes: 
    • September: I currently have 100 receipts that I need to itemize... let's do it next week... 
    • + 1 week ... : more receipts ... will do it next week....
    • April: so many now.... but I NEED to get this done or the government will be on me... CRAP, CRAP, CRAP, CRAP, CRAP!!!!!!
  • Magazines/Online Courses: I am already behind by 3 issues/lessons... can I really catch up? how much time is it going to take? why bother?
  • Books: my reading list has over 30 books... and each has 200+ pages... My Kindle collection has another 1,000+ and gets longer every week... I'm never going to be able to finish this... what's the point of starting.... Maybe I will read one when I am really, really, really bored...


And now you start thinking: What to do.... what to do, where do I start...

All the while...

  1. Nothing actually gets done 
  2. You get more and more stress out
  3. The piles keep getting bigger


So what do I do? And I think what you should do

  • Prioritize
  • Make a recurring plan
  • Follow it mostly and occasionally, grit your teeth and JUST DO IT!

So back to the example and here's what I do for the first two steps:
  • Blogging
    • Plan
      • I'll try to do at least one post a week, assuming I have something to say
      • I can also do it during my commute there are some really nice benefits to long commutes by public transportation
      • There are also benefits to blogging See separate post
    • Priority: medium-high, hey it's pretty fun and I have the time
  •  Taxes
    • Plan
      • Every week or two, I will digitize the receipts and enter the amounts into an Excel file
      • Mostly just keep the number of receipts needed to be processed low
    • Priority: high, this stuff isn't as fun as blogging so have to kind of push it
  • Magazines/SlideShare/News (these tend to fall together)
    • Plan
      • Magazines: keep it manageable and up to the month; can always skim
      • Everything else: leisure activity, maybe just check a few times week, no real back-log with these
    • Priority: medium
  • Books
    • I'll read the ones I find interesting and +1 if they are short but informative Yes +1 is actually good for something, I use it to mean that doing gives you some free bonuses so yea actually not Google's intended purpose
    • Priority
      • Short and/or useful: medium
      • Need to know: high
      • Kindle and long books: low... super low
OK so I think you get the point and it's been an hour so... just going to stop now... will wrap up and clean up maybe in another update.

Saturday, October 3, 2015

Is Apple's Revolutionary New Features Really That Revolutionary?

Lately Apple is once again at it hyping new features such as 3D Force as a new feature that will change the way people use devices.

The sensitive touch is kind of nice and Apple has introduced new hardware such as fingerprint scanner which may be a nice addition but this 3D Force thing seems like its fixing it's own problem...

Similar to how it was hyping Folders for it's iOS 4 a long time ago.

For these, all I want to say is "Hey Apple welcome to the party, thanks for catching up to the times!"
Back then Android already used folders and the jailbreak community had that as well.

Back to 3D Force, I am usually an Android user but wanted to do some e-book reading and note taking on the iPad since it is more suitable, bigger screen.

Google has standards about what a long-press and other common actions should do and usually the developers follow these because it makes intuitive sense to them...

Apple... there are no standards and their apps are the worst offenders of all....

Take Photos. I take screen shots of my notes and highlights while I read and then round them up and upload to Google Drive. But I review these before that in the app.

Sometimes I have duplicates and so I open the app and see the photos... but to Delete them I can just long-press...

No I have to click on the "Select" button on top... then select the images I want to delete and then click on a Delete or Trash icon...

Android? Just long press and it goes into Selection mode where I can multi-select and then choose a Delete action which is now in the action bar.