Tag: Development

Code Reviews

A common thing that is often observed in code reviews is people taking them personally, which is the worst thing a dev can do. CRs are meant to encourage best practices, catch errors a dev may overlook as their eyes gloss over the changes, and ensure code quality, while also aiding the skill development of the author AND the code reviewer.

Reviewers aren’t trying to judge the author – they just care about the quality and maintainability of the code being checked in and the more code reviews one does, the more patterns they start seeing of things which become problems in the future. Which is why even the most experienced of developers don’t check-in code without a CR.

A lot many devs myself included, and especially those in the senior/principal levels, tend to look at all code reviews in their team/skip-team – to see where they can jump in and help, to learn from others, and to watch out for things that seem innocent and correct at the component level but could become problems in the future or when looking at the bigger picture.

Downloading Fidelity 401k transactions into an Excel spreadsheet

The Fidelity 401k account transactions download option just lets you download amount/shares per transaction – i.e., they don’t give you the option to download the split of each transaction (employee pretax, employer match, after tax etc.). I maintain an excel spreadsheet of my own for this but it’s a pain as it needs to be kept up to date manually by looking at the Fidelity website (and clicking the pesky ‘show details’ link to expand each transaction).

So I automated a bunch of this – you can get the scripts from https://github.com/amalani/FidelityTransactions.

  • Copy pasting the first file (fidelity.js) in the F12/developer options’ console tab of the browser when you’re on the transaction history page of Fidelity downloads all the transactions into a new file (transactions.js) on your machine.
  • Dropping this file on the second file (ExportToCSV.js) in Windows Explorer generates a CSV file containing all the transactions which can then be opened in MS Excel.

The CSV looks something like this but MS Excel treats it as a spreadsheet.
Date,Investment,TransactionType,Amount,Shares,Blank,01 - EMPLOYEE PRE-TAX,02 - EMPLOYER MATCH,05 - REGULAR AFTER-TAX,
12/31/2015,FIMM MONEY MKT INST,Contribution,1094.79,1094.790,,,60.08,1034.71
02/02/2016,VANG S&P 500 IDX TR,Exchange In,1000.00,9.82,,764,236
02/03/2016,FIMM MONEY MKT INST,Dividends,0.43,0.430,,0.25,0.18

Let me know if you find it useful.

Psychic Debugging

A peer team member (his manager and my manager report to the same person) was investigating a bug that the Office team had reported about in the Taskbar. The issue was a bit hard to repro and under a particular condition, would fix itself up but up until now the investigation from our side had mostly been about trying to figure out the best way to repro this bug to then try and figure out what’s going on. My colleague got some other high priority work assigned to him so I got pulled in to continue the investigation.

After spending some time debugging Lync and explorer under windbg simultaneously (so I could track the API calls from Lync), I replied with my findings and the bug opener’s (OP) reference became a rather happy moment me. (email summarized and actual details removed)

OP: That’s exactly my reference. 😉

Me: OMG, I’m the new Raymond Chen 😉

OP: I think, it’s a fine example of psychic debugging! 🙂 That’s exactly what my settings are.

Me: I spent some time looking at this and although I haven’t been able to repro this myself, I think this would happen for either of the following two reasons, although reason 2 seems less likely the case. Reason 1 …, 2 ….

OP – are you running Lync.exe under these non-default settings (settings Lync doesn’t ship with) which is probably what’s causing the bug? I haven’t been able to repro this myself but I’d expect this to happen only under those settings due to …

Raymond is a resident ninja, and probably one of the best Win32 devs of all time. So, this is probably one of the best compliments ever.