/coding-challenge

my coding challenge

Primary LanguageJava

Coding challenges

These great challenges are published at https://codingchallenges.fyi by John Cricket Twitter

Checkout the newsletter also here on https://codingchallenges.fyi/

I have started on week 1 in implementing the challenges starting March 2023. Since then John published every week a new challenge.

I love the most the real world applications as Redis, load balancer, webserver, IRC client, json parse, url shortener and more to come ....

I started to use Discort and Twitter and https://github.com/CodingChallegesFYI/SharedSolutions to share my solutions.

I decided to implement it back with Java. I have been working with Java since v1.0 back in 2000 and worked with it professionally for more than 18 years. Then I started with C# and powershell working with Azure Cloud.

Write your own

Here you can find all my implementation, challenge see: https://codingchallenges.fyi

See also other solutions implemented: https://github.com/CodingChallegesFYI/SharedSolutions

Some feedback and and my personal complexity rating

1 * = simple, 5 ***** = a real challenge
no Build Your Own Link code Description Complexity
1 wc tool no-1 very simple tool to get back with
Java tooling, pipelines and arg parsing
1 *
2 JSON parser no-2 this is a great project to implement scanner and parser
tried to strong test it with lots of test cases (pos and neg cases)
2 **
3 Compression tool no-3 get into the Huffman Encoder/Decoder
quite complex binary trees with insertion logic
without testcases - no chance to solve this riddle
awesome experience John
2 **
4 cut Tool no-4 little linux tool. simple and easy 1 *
5 Load Balancer no-5 invested quite a bit of time for fully dynamic and reliable Round Robin
and chaos engineering tests to kill processes
2 **
6 sort Tool
7 Calculator
8 Redis Server no-8 this is by far the best challenge I have every implemented
learning the redis protocol step by step
I extended the challenge with lots of commands
3 ***
this is AWESOME idea by John to implement
with this you can really learn a new language
I implemented a lot of test cases: I used chatGPT to generate test cases
9 grep Tool no-9 I used just my mobile phone and javascript to implement it
had some headache topics with * and folders .... check it out
1 *
10 uniq Tool
11 WebServer no-11 cool to learn the HTTP1.1 protocol and implement it without support libraries
I extended my work to implement Servlet types (static files, rest) with routing
2 **
12 UrlShortener
13 diff Tool
14 shell
15 cat Tool
16 IRC Client no-16 great to learn the protocol of IRC
massive refactoring from step 2 to step 3 - as supposed
I tried to this not to build a scanner but use regexp for the different patterns. finally I must say - I like scanners.
without https://regex101.com/ - no chance to implement this type of regexp
2 **
17 memcached server no-17 fully functional server with many commands, memory mgmt
cmd pattern to plugin more if interested
lots of testcases
additional memcache client test
implement a server and a client
Later: try to use consistent hashing for multiple servers
3 ***
18 spotify client
19 discort bot no-19 configured my own discort server
implemented a pluggable cmds
not deloyed on a server
1 *
20 LinkedIn carousel
21 sed-tool
22 DNS resolver no-22 implemented A, cname, mx, txt records
resolver does same printout as 'nslookup'
can be parametrized to test dns principles
default using localhost loopback 127.0.0.53:53
3 ***
23 traceroue
24 realtime chat client
and server
25 NATS server no-25 implemented NATS server and client
cool challenge
3 ***
26 git client
27 rate limiter
28 ntp client
29 scheduling automation app
30 Lisp interpreter no-30 implemented full Lisp tokenizer, parser and interpreter
implemented > 30 built-ins incl pure function caching for faster execution
4 ****
love Lisp. used it to build first neuronal network with 10 own perceptron (back in 1994)
additional idea: build interpreter to build this again
31 QR Code Generator no-31 implemented full spectrum of codes: alpha, byte, kanji
with all versions support, quality
impl debug support with text canvas
5 ******
impl regions algorithm of rectangles to impl positioning of bits automatic
masking tutorial awesome but some missing tips
complexity totally underestimated. testcases are key
32 Crontab
33 head
34 jq no-34 used my json parser from no-2
implemented own parser for jq expressions
own json serializer for pretty printing
new jq evaluator of the expressions
2 **
35 Google Keep

A brief history of my coding languages learned and used

Year Language Notes
85 BASIC, Assembler Back in 1985 I learned to code in BASIC on Sharp 1401
and with MS-DOS in 1985 on my 1st PC 4.77 Mhz,
with a Hercules monochrome grafic card, <br/1MB RAM, 20MB Disk :-) and
Floppies. And sure got to know Assembly to do all crazy stuff down the low level.
87 Pascal With the Apple Macintosh 512e used in highschool I started coding with Pascal by Niklaus Wirth.
During an internship I used Pascal to run on an VAX by DEC
89 Modula-2 Modula-2 as the successor of Pascal also by Niklaus Wirth and here I started all my private coding
90 bash with the usage of UNIX systems at ETHZ I started with scripting
90 C and C++ with the first university challenges I touched C and C++ but did not like it.
91 Oberon, Oberon-2, XOberon At University ETH Zurich I used to code in Oberon by Niklaus Wirth and Oberon-2
the object oriented extension of Oberon and XOberon at Institute of Robotics. I loved it.
93 Lisp + Prolog Beside Oberon we use to code our first Neuronal network with 10 neurons in Lisp
and our first knowledge base in Prolog - something completly different but nice.
94 Smalltalk At my first business job in 1994 I learned and loved Smalltalk - the real object oriented language.
In a private project, I even implemented my own Smalltalk parser, compiler and byte code runtime environment
in Oberon based on the architecture and bytecode from A little Smalltalk.
I also used Visual-Age Smalltalk in my STA in Dallas, TX, USA in 1999.
2000 Java In 2000 I arrived at the WWW finally and I learned Java and JDK 1.x and used Java for more then 18 years in business and private.
2011 Javascript, NodeJs During Hackathons I learned to code in Javascript, node.js, Solidy
2014 Objective-C, Swift, Swift-UI with winning an innovation award in 2014 I started coding with Apple Objective-c for iPhone
and Apple Watch Series 1 and later with Swift and SwiftUI for our winning Hackathon idea m-clippy.
2020 C# Coding for my beloved Hololens 1 developer edition I started with Unity and C#.
Including Hackathons at Microsoft in Redmond with Principal engineers from the Hololens team.
Implement 1st holographic bot called LoloBot.
2021 Powershell Then I arrived in the Azure Cloud and used C# and powershell for more than 3 years now.
2023 Typescript Now back at OpenAPIs development with Nodejs (nestjs) with typescript
2023 Back in Java Now for the Coding challenges I flipped back to Java. Unfortunatly Oberon and Smalltalk are almost dead.

*** and maybe I forgot many languages I learned beside: German, French and English.


Thank you

I wanted to thank John Cricket for these challenges and I encourage every Engineer from Junior to Principal to do this. Learn a new language or get back to language you have used to code (as me here in Java).

And also learn to understand real-world applications while writing your own version of it.

thx Lolo

LinkedIn Twitter