Maybe inappropriate methods of recruiting software engineers

 

After reading Who is hiring thread every month, I summarize some maybe not good methods of recruiting software engineers:

(1) No words, just a Data Structure/Algorithm quiz.

I am not arguing whether Data Structure/Algorithm quiz is a suitable method since there is already a lot of debate on this topic. What I think may be bad is after you submit your CV, you receive a link which requires you register, and complete a Data Structure/Algorithm quiz in a limited time. You don’t know if you CV is really screened or not. Then after you spend some hours to finish the test, maybe there is not any message at all. You can think the quiz grade isn’t good enough, or your skills in resume doesn’t touch them, but all in all, no one tells your answer. The whole process is over even you don’t say one word to the recruiter!

Both recruiter and applicant are equal in recruiting process, so a general discussion is better than just throwing a quiz link. Applicant also needs to know about what the job is and whether it is worthy for him/her to continue the whole process. BTW, I think this comment really makes sense.

(2) No any response after sending application.

By default, if you doesn’t receive any response after submitting job application, you are rejected. Sometimes, the company employee’s mail address is in the recruit information with friendly words such as “Let us have a talk if you are interested …”. But when you really send query to employee’s mail address, there is the possibility that the employee won’t answer you. Personally, I think it is a good etiquette to send a refuse notification to applicants even if it is a auto-generated mail. Are you really so busy that can’t respond a mail?

BTW, there is another scenario that after some rounds of interviews, there is no any message from the company. You can refer this comment.

IMHO, the companies can gain a good fame if they pay attention to above points. Trust me!

Be cautious of upper/lower case letters about function in Haskell

As a layman of Haskell, I find being cautious of upper/lower case letters help me a lot to get understanding of functions:

(1) Function name doesn’t begin upper case: it can be lower case (e.g., sqrt) or special characters (e.g., +).

(2) Function has type. Let’s define a new function, incInt:

incInt :: Integer -> Integer
incInt a = a + 1

The above identifies incInt‘s type is “Integer -> Integer“: Integer is type in Haskell, and types begin with upper case. Check another built-in functionsqrt:

Prelude> :t sqrt
sqrt :: Floating a => a -> a

The “Floating a” which is in the left of => is called type constraint: Floating is typeclass, and its values are types which satisfy this typeclass (Floatingtypeclass contains both Float and Double types); a is a type variable which can be any type which belongs to Floating typeclass.

Takeaway:
a) Function name can’t begin with upper case letters.
b) Type, typeclass, type variable occur in function type definition. Type and typeclass begin with upper case letters, and type variable need to begin with lower case letters.

Set up Haskell development environment on Arch Linux

Follow this post, install stack first:

# pacman -S stack
resolving dependencies...
looking for conflicting packages...
......

At the end of installation, it prompts following words:

You need to either 1) install latest stable ghc package from [extra] or 2) install ncurses5compat-libs from AUR for the prebuilt binaries installed by stack to work.

So install ghc further:

# pacman -S ghc
resolving dependencies...
looking for conflicting packages...

Now that the environment is ready, you should modify your own ~/.stack/config.yaml file:

# This file contains default non-project-specific settings for 'stack', used
# in all projects.  For more information about stack's configuration, see
# http://docs.haskellstack.org/en/stable/yaml_configuration/

# The following parameters are used by "stack new" to automatically fill fields
# in the cabal config. We recommend uncommenting them and filling them out if
# you intend to use 'stack new'.
# See https://docs.haskellstack.org/en/stable/yaml_configuration/#templates
templates:
  params:
#    author-name:
#    author-email:
#    copyright:
#    github-username:

For example, add name, email etc.

Then follow this link to create a simple program:

# stack new hello
# cd hello
# stack setup
# stack build
# stack exec hello-exe

You will see “someFunc” is outputted.

BTW, you can also use ghc compiler directly. E.g., write a “Hello world” program (Reference is here):

# cat hello.hs
main :: IO ()
main = putStrLn "Hello World!"
# ghc -dynamic hello.hs
# ./hello
Hello World!

That’s all!

Be careful of thread stack size

Today, my colleague came across a thread stack overflow core dump:

Capture

From above diagram, we can see only this function’s stack will occupy ~7 MiB space. Check the stack size configuration on system:

$ ulimit -S -s
8192

just 8 MiB. Double the stack size:

$ ulimit -S -s 16384

The program won’t crash.

Reference:
General: How do I change my default limits for stack size, core file size, etc.?.

 

Reflection on my work in 2017

As 2017 draws to a close, it is time to recap what I did in this year. The “work” here is divided into 2 parts: daily and part-time.

Daily job:

(1) Cryptography and security.
I joined in current company in December 2016, so 2017 is literally my fresh year. Our team focuses on cryptography, and this area has a high requirement on maths, such as Number Theory, Linear Algebra, etc, so it is a really challenge for me since I have left campus for nearly 10 years, and my past work experience involved much on engineering. Honestly, I have made some progress in maths compared to one year ago, but there is still a large distance to the expert in cryptography field. If you want to dive into this discipline, this tutorial is a good rudimentary material.
In this December, I went to London to attend Black Hat meeting (The trip report is here). The security is definitely becoming more and more important, and one of my deep feeling is many sub-fields of security don’t require much maths background like cryptography, but they require you are versed in the whole computer system. Maybe security becomes next big business opportunity.

(2) High performance computing.
Since cryptography introduces a lot of computation, reducing time is an important task.

a) GPU programming.
GPU is heavily used in HPC area now, so I learned CUDA/GPU programming and implemented some algorithms in GPU. One by-product isĀ lscuda, a command mimics lscpu on Linux.

b) OpenMP.
Besides using GPU, harnessing OpenMP to paralleling code in CPU is my another task in the past year.

c) C++.
Because most Open Source code in cryptography is written in C++, one big harvest is I got the chance to refresh and use C++ in my daily life, and it really improved my coding skill. E.g., a generic log implemented in C++.

d) Performance tuning.
Finding the hot-spot of program is an eternal topic in tuning high performance computing. I dived into perf/Flamegraph tools shipped on Linux, and these weapons indeed helped me to find the culprits.

(3) Others.
I not only utilize the Open Source work, but also contribute to them, such as FHEW, sql-parser, and so on.

Part-time projects:

(1) Rust programming language.
Every year I will try to get my hands dirty on one new programming language. After watching this video, I decided to learn Rust this year. STREAM and RustTCPFramework are 2 small exercises.

(2) eBPF.
When using perf, I knew eBPF is a new powerful tool on Linux, so I also spent a lot of time in bcc project. The by-product of this procedure is using Python.

(3) OpenBSD.
The OpenBSD is famous in security area. Besides submitting patch for it, I also wrote some articles introducing this OS. BTW, lscpuand umalloc are 2 projects I created for BSDs and Unix.

(4) Recommended books:
The following are books I read this year and think they are worthy for recommendation:

a) Code: The Hidden Language of Computer Hardware and Software.
This book introduces the basic composition of the computer. For implementing some cryptography algorithms, I need to build the circuit logic. This book gives a good reference.

b) Multicore Application Programming: for Windows, Linux, and Oracle Solaris (Developer’s Library).
This book was published in 2010, but it is still a comprehensive handbook for learning parallel programming.

c) Grokking Algorithms: An illustrated guide for programmers and other curious people.
This book just covers the basic knowledge of algorithm, not too deep. It is suitable for reviewing algorithm before interview.

For the next year, now I plan to do the following tasks:
(1) Continue to learn security and cryptography;
(2) Study one functional programming language.

Let me keep going!