Chandra Sekar's Blog

Safe and Convenient Password Management

09 Oct, 2017 security / password

For better or worse, passwords are central to the safety of almost all our online accounts. 2-factor authentication systems are meant to protect users from compromise of their passwords. However, not all services support it. Also, several online services (including banks), use OTP sent over SMS as the second factor. This has several vulnerabilities and has been deprecated by NIST. That leaves password as a critical piece of these accounts' security.

 Read more

Prepared Statements Without Additional Round-Trip

09 Jul, 2017 postgresql / database / sql

Prepared statements are the best way to avoid SQL injections in applications accepting user input. However they require an additional round-trip to prepare the query, which increases latency when your queries are dynamic and the statements are not re-used. PostgreSQL allows execution of such queries without the additional cost!

 Read more

Java's CompletableFuture and Threads

19 May, 2017 java / multithreading

Quiz time. How many threads (other than main) will this program create on a dual-core machine?

public class App {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            CompletableFuture.runAsync(() -> {

 Read more

Timing Equity MFs with PE

08 May, 2017 equity / timing / mutual-fund / pe

The rule of thumb for equity investments is to not time the market, but there are also several analyses correlating investing at high index PE levels with lower returns. So can we use the PE levels of indices to generate better returns than SIP and reduce volatility of the portfolio?

 Read more

Arena Allocation in Go

07 Jul, 2014 golang / allocation / arena

One of the weaknesses of Go’s runtime today is the relatively naive GC implementation. This is evident from go performing consistently worse than most other languages in the binary trees benchmark. However, the language can make designing programs that reduce GC cost fairly straightforward.

 Read more

← Newer Posts   Older Posts →