Shreyas Chand

↩Index

An (Incomplete) Catalogue of Things I Learned as an Intern

Posted on 25 July 2013

This summer I’ve been working at CareZone. I’m working with some really amazing and talented folks, and I have learnt a LOT! This is a list of some of the most notable technical things. This is by no means complete, and is not intended be as such. I might at some point right about my experience in general beyond technical learnings.

Weak References in Java

These are a type of object that the Garbage Collector ignores when determining whether an object can be disposed or not. I saw them used in our codebase inside a central helper class to keep a reference to a wrapper around a database connection. They can also be used in caching mechanisms, but a SoftReference might be better suited for the job (because the GC respects it if it is not low on memory).

Further Reading:

  1. Understanding Weak References
  2. WeakReference<T>
  3. SoftReference<T>
  4. PhantomReference<T>
  5. WeakHashMap<K, V>

Creating Custom Views for Android

It’s HARD. ‘nuff said. I want to document the process more, but for now here are my lamentations and whining:

Writing custom views is not easy if you want to make any non trivial modifications or create whole new views for Android. You are required to do screen measurements, layouts and drawing on your own. You have to deal with the complete lifecycle of your view, through rotation, pausing, content updates and more.

Further Reading:

  1. Creating Custom Views

Better Code Search: Ag over ack

Use The Silver Searcher, it is sooo much faster than ack. Go install it now: (Now! Seriously mister.)

$ brew install the_silver_searcher
$ ... comparing ag and ack runtime using time ...
$ brew uninstall ack
$ brew cleanup

Further Reading:

  1. The Silver Searcher: Better than Ack

Git and Bash aliases

Fork them! Use them! Profit! My dotfiles repo is publicly available on github.


← Previous Post

comments powered by Disqus