• How to get a software engineering job in Singapore

    If you’re thinking about it, you might want to start with these two websites:

    1. MyCareersFuture.sg

    This is a portal that aims to provide Singapore Citizens and Permanent Residents with a fast and smart job search service to match them with relevant jobs… The portal was developed by Workforce Singapore, in partnership with the Government Technology Agency.

    This is not just another government website:

    From 1 Aug 2014, under the Fair Consideration Framework (FCF) by the Ministry of Manpower (MOM), companies seeking to hire Employment Pass (EP) holders are required to post their job vacancies on MyCareersFuture.sg for at least 14 calendar days before an EP application is submitted to MOM. For more information on FCF, click here.

    So technically speaking, the HR department will list the job vacancies as early as possible.

    This is not all, most important feature for me is the salary info, even though only a range, it really helps me understand the market (on some level), for example, by reading few lists here, I know that:

    Some of the packages may have different components, but the range gives me much better visibility of the market.

    2. efinancialcareers.sg

    As you may know that many financial institutions have development teams in Singapore, so you better set up your profile at efinancialcareers.sg — even if you have no interest in this industry.

    Setting a profile here will attract most of the recruitment agencies, they will try to talk to you, share their opportunities. Be open-minded, talk with them, they will try their best to find a matching opportunity for you.

    However, other websites such as “Linkedin”, “Indeed” are also very helpful, but for me, “MyCareersFuture” and “efinancialcareers” are the most effective ones.

    Good luck!

  • Google Cloud Tasks: use queue.xml to control rate for slow queues

    We got a service that has an HTTP request rate limit: less than 1 message per 10 seconds. we don’t use this service frequently, but when we use it, we send two requests sequentially, as expected, we received few http 429 errors.

    I kind of agree that it’s my responsibility to control the rate, but I don’t want to let my code aware of these constraints, so we decided to let Google Tasks control the rate.

    First try

    I don’t know much about token bucket, by glancing the help doc, I think it will help by setting --max-dispatches-per-second=0.01  (1 message / 10 seconds) with:

    cloud tasks queues update my-task-queue --max-concurrent-dispatches=1  --max-dispatches-per-second=0.01
    

    however, we noticed that HTTP 429 persists after the change, task queue log shows tasks are dispatched almost at the same time.  until we checked the maxBurstSize

     Each queue has a token bucket that holds tokens, up to the maximum specified by maxBurstSize. Each time a task is dispatched, a token is removed from the bucket. Tasks will be dispatched until the queue’s bucket runs out of tokens. The bucket will be continuously refilled with new tokens based on maxDispatchesPerSecond. and this field is an output value of gcloud, gcloud tasks queues describe my-task-queue shows the maxBurstSize is 10.

    so the bucket should have 10 tokens initially, even though I set the rate, but in my case, the first call will get run immediately because 10 tokens are available right there.  read the document again, and I found:

     In most cases, using the Cloud Tasks API method and letting the system set max_burst_size produces a very efficient rate for managing request bursts. In some cases, however, particularly when the desired rate is relatively slow, either using the queue.yaml method to manually set bucket_size to a small value, or setting your max_concurrent_dispatches to a small value via the Cloud Tasks API can give you more control. https://cloud.google.com/tasks/docs/configuring-queues#rate

    Second try

    set bucket_size to 1 using queue.yaml, task queue log shows tasks are dispatched right at the rate I set. 

    That’s not all,  you’d better to read this one before using queues.xml:

    Pitfalls of mixing queue.yaml and gcloud command

    and these posts also help:

  • Working at a startup for 6 months

    It has been (almost) 6 months with my new role at a startup, I feel like that I’m running everyday and have no time to really think about the change. Is this kind of the “new stupid”? I hope it’s not, so I want to summarize and write it down the difference I learned.

    I managed to concentrate on my work and “run as fast as I can”

    Well, I’m not saying that I didn’t concentrate on my work in my previous jobs. What I mean is I literally spend all my time on my work, not on meetings, emails, reports etc,. I used to spend a lot of time updating my manager on what I was doing and I needed to produce nice reports to my managers and sometimes, my manager’s managers.

    The bottleneck is not the infrastructure team or change management team, it’s just me. I have access to all products, I can deploy or destroy the production environment anytime, as long as I’m aware of what I’m doing. That’s cool!

    Delivery the product, not beautiful code

    I used to work in a relatively bigger team with ~20 developers, splitted to 3 prods focused on different products. Most of the banks I worked for have “change-freeze” periods, mostly December will be one of them. One day, my manager declared that we’ll do “platform enhancements” with a few nice diagrams. However, at the moment we all know that our product got few bugs like users cannot buy our products just because they don’t have a valid date of birth in the CRM.

    I’m not very happy with it because the proviritoy is wrong to me, if I receive 10% of each transaction, I’ll fix all the known production issues ASAP. but I’m not receiving any commision, neither does my manager. So we had a nice holiday season on refactoring. I enjoyed it, but I don’t think stakeholders will be happy if they really understand what we’re doing.

    Small startups are completely different, with limited resources, we need to deliver a working product and get actual feedback from the markets. They might like the product because of a nice design, but definitely not because of my beautify code.

    Size Does Matter

    I don’t really understand this when I first read it few years back, but now I do:

    We’re small and we like it that way. It gives us the ability to turn on a dime, deliver projects quickly, and dedicate extraordinary attention to your assignment. Our size allows us to work on projects we want to do rather than projects we have to do. Plus we can all fit in one cab if we squeeze. [https://37signals.com/05.html]

    Do everything and get the job done

    In my previous job, I and one of my teammates acted as the “DevOps” team for one year, there’s a big gap from code and functionally product, and nobody wants to get hands dirty to fix the gap. we decided to do everything required to deliver the code to a product, without writing much code for the product. we handle many tasks from managing stakeholder’s expectations, involved in system design (we gave up soon because of manager-driven design), code review, quality control, deployment, production support.

    the mindset is different here, we don’t have dedicated team to help you on database, messaging queue, network etc.  so in 6 months, I picked python and Django, got my hands dirty with Google cloud, delivered few features, and of course, fixed bugs created by myself. 

  • Lessons Learned from Take-Home-Projects in Job Interviews

    Consider a take-home-project an opportunity to demonstrate your design and coding skills. writing aFactory to produce intances is much more interesting than answering ‘can you tell me one design pattern that you used?’

    Prepare a seed/template project to save time

    e.g. https://github.com/guoliang-dev/java8-maven-seed-project:

    • a default pom.xml with dependencies(e.g. junit) and plugins(e.g. jaccoco)
    • a default CI config e.g. bitbucket
    • a default readme

    Put your solution into a remote private repo and setup build pipeline

    such as github/bitbuket, make sure it’s a private one and build pipeline is enabled. both github and bitbuket are offering certain free minutes for private repo build.

    Prepare a readme.md

    typically a readme file should contains:

    • your name, email and your github url
    • assumptions
    • high level design
    • TODO items: show that you can continue ehancing the project if you got more time

    however, don’t expect that interviewers will read all details carefully.

    Add comments in your code

    this will help interviewers understand your code and also let them know that you’re aware of poetnial issues.

    generally I’ll try my best on naming, so that I dont need to add comments. howerver, comments will help for:

    • complex codes
    • messy codes, e.g: // todo: refactoring required, should reduce the size of this method
    • shortcut. e.g: // todo: use proper ThreadPool to handle MT

    Unit tests / intergration tests / end-to-end tests

    always write unit tests, even though it’s not mentioned at all, ideally follow TDD.

    • tests help you verify your solution
    • tests help you make further changes safely
    • tests help you design your project in clean way

    Think about the next stpes

    you may required to have code review sessions with interviewers:

    • you need to share your design and might get challenged about the technical design you made
    • you might required to fix certain bugs or add features

    Coding during interview

    if you’re requested to fix a bug or add an enhancement, make sure:

    • run all your tests before making any change
    • limit your change scope: only make minimal necessary changes to delievery the task, you might want to refactor a lot DO NOT change anything if it’s not linked to the task.
  • Time Series Analysis with Python

    I have a log file contains numbers indexed in time, I want to generate time series chart to display the data to my users. However I’m new to data visualization, so I’m tracking what I did in this post.

    Environment Setup

    Jupyter is a nice tool to playaround with python, so get it installed or get a docker instance:

    docker run --rm -p 8888:8888 -v "$PWD":/Users/gouliang/jupyter-home jupyter/scipy-notebook
    

    if you’re not sure about which image to choose: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html

    url with access token will be displayed on the console.

    Hello world

    start a python notebook and run:

    ## https://stackoverflow.com/questions/19079143/how-to-plot-time-series-in-python
    
    import matplotlib.pyplot as plt
    import datetime
    import numpy as np
    
    x = np.array([datetime.datetime(2013, 9, 28, i, 0) for i in range(24)])
    y = np.random.randint(100, size=x.shape)
    
    plt.plot(x,y)
    plt.show()
    

    a nice time series chart will be displayed.

    #WIP


subscribe via RSS