Jekyll2023-03-11T01:18:45+07:00https://9a24f0.github.io/feed.xmlBlog de mingnhoMy personal websiteMinh Ngoxminh.ngo.00@gmail.comWriting and the future of this blog2023-03-10T00:00:00+07:002023-03-10T00:00:00+07:00https://9a24f0.github.io/to-write<h3 id="to-write-is-to-think">To write is to think</h3>
<p>I generally believe that, when we write, we do think thrice (not twice).
Firstly, we brainstorms our points. Each could be a simple keyword, a
whole sentence or an idea for a paragraph, which I would refer it as
<em>“the components”</em>. After that, we reorganize and develop those components
to structure our writing. Finally we do the review, tweaking here and there,
finding more suitable words, rephrasing sentences so it could better convey
what we mean, etc.</p>
<p>I do love the process and this blog is the result of it. However, there are
problems preventing me from continously and productively write blogs:</p>
<h4 id="i-feeling-more-and-more-ashamed-sharing-about-technical-views">I feeling more and more ashamed sharing about technical views</h4>
<p>I was always ashamed on sharing technical thoughts, since most of who do
read my blog have better view than mine. It just get worsen after years
because I’m swaying from new technologies. Work industry is draining my time
for learning and trying, not to mention the deficiency of mental energy after
finishing the shifts (or am I just finding excuses for being lazy?). In
addition, things I touched during the work is daunting and I would prefer
not to share about it. What is left is just issues that is much irritated me,
to the point that I had to rant about those in my blog.</p>
<h4 id="writing-in-this-manner-took-so-much-effort">Writing in this manner took so much effort</h4>
<p>I do write much more, but not on this blog. I do own a series, tagged
<strong>#Đilàmcógìdzui</strong> which recevied much more appreciation from my friends
In such posts, I acted as a story teller, which the brainstorming process
could be skipped since I already know exactly what to tell. Besides,
I did skip the review since I could try using sarcastic way of writing at
first, as the goal of the series is just to make fun of my work life.
Normally, it took only 20-30 minutes in total, while writing a blog took
much more than that, ranging from 2 hours to 4 hours, to even days and
weeks to brainstorm.</p>
<h3 id="the-future-of-this-blog">The future of this blog</h3>
<p>My hobbies shifted quite a lot during the year: I watched less and less
animes, and I’m feeling the quality of the series nowadays are not worth
my recommendations. So there won’t be much of those posts in the
future.</p>
<p>I started picking photography, which I believe it sparked from my late 21.
However, it’s not until now that I fully recognize it. I bought a real camera
and started going out for shooting purposes. Hope that there will be posts
tagged with <strong>photography</strong> arriving to this blog soon.</p>
<p>I’m also trying my best to spent time learning new (old) things, so let’s
hell high hope about more technical posts on this blog, as it follows my first
intention when creating this. This is just hopium on my side, since I might not
overcome my shamefulness *shrug*</p>Minh Ngoxminh.ngo.00@gmail.comTo write is to think I generally believe that, when we write, we do think thrice (not twice). Firstly, we brainstorms our points. Each could be a simple keyword, a whole sentence or an idea for a paragraph, which I would refer it as “the components”. After that, we reorganize and develop those components to structure our writing. Finally we do the review, tweaking here and there, finding more suitable words, rephrasing sentences so it could better convey what we mean, etc.Status update: 2022 in a nutshell2022-12-30T00:00:00+07:002022-12-30T00:00:00+07:00https://9a24f0.github.io/2022-wrapped<p>Literally how I fvcked myself up in 2022.</p>
<h3 id="work">Work</h3>
<p>Not like in 2021 when I was buried with deadlines when coping with
the pace of working in the industry. I gave myself room to relax
this year, mostly because I somewhat caught up with the workload
and pressures. Besides, I had chances to join front-end developing,
that’s when I realized that I had much more things to cover (Idk,
maybe my colleague was too good? But it’s good sign also). However,
there is a problem that when I learn new stuffs, other skills just
got dulled. It’s like mouse-hitting game, when I put my effort to
sharpen an aspect, others just got worsen so badly that I had to
re-visit it, and it took time LOL. I don’t know (yet) how to escape
this loop circle, but at least I’m trying 😅.</p>
<h3 id="life">Life</h3>
<p>This is the main cause that I had to admit that I fucked myself up
in 2022. But let’s look at the bright side first:</p>
<p>This year marked the first time I truly took care for a pet.
At first I don’t want to raise her, since I’m afraid of tieing myself
with responsibilities. But then my uncle just forced me to do so,
and I think I should give him a proper thank for that. Raising
and caring for a cat is awesome (yep, except when you had to clean
up their <em>literals</em>)!</p>
<p><img src="/assets/img/2022-wrapped/my-lil-daughter.png" alt="Image" />
<em>She is so happy, like the <a href="https://fairytail.fandom.com/wiki/Happy_the_Blue_Cat">blue cat</a></em></p>
<p>Secondly, after those years, I my health finally allowed me to have
a flight to HCMC. There, I had chance to visit my friend - Khải and Huyền
(or in short Khải Huyền, no pun intended 😉). Thank you both for being
my tour guide, we had wonderful memories back then.</p>
<p><img src="/assets/img/2022-wrapped/dalat-aug.jpg" alt="Image" />
<em>Photo of us before Dalat market</em></p>
<p>I also did visit my foreign friend - Kato. He invited me to join their
family dinner. The food was phenomenal, even when I was expecting some
from a chef. Glad that I could see your family living happily in Vietnam.
And if you might read this blog, hit me when you have a plan to visit
Hanoi, please!</p>
<p><img src="/assets/img/2022-wrapped/kato-and-his-son.png" alt="Image" />
<em>Kato is a wonderful dad, I promise 😉</em></p>
<p>On the other hand, my 2022 is not filled with pink. I got myself into
some small conflicts and dramas this year, and they literally drained me
so bad. Remember those day I had to force myself to work non-stop just
to forget about those negative and scareful thoughts. Yep, me scared af.
But hey, that the past, and it’s no longer our concern, ain’t it?</p>
<p>In addition, my friend circle has shrunken at fast pace. To the point
that I found it’s hard to find someone when I’m in trouble. I’ve been
recklessly to keep my circle, even trying to talk with new people but
still can’t maintain it. Special thanks to anhvt - one of my colleague
and Đậu - my best friend that stayed to listen to me, and gave me advice
when needed.</p>
<p>Besides those wonderful and fucked up moments, I’ve adjusted some of
my thoughts (especially when I read <a href="https://9a24f0.github.io/2021-wrapped/">my 2021 wrapped</a>):</p>
<blockquote>
<p>Please drop playing games, since it took too much of your time!</p>
</blockquote>
<p>No! when things went bad and you want something to keep yourself sane
(at least keep yourself from negative thoughts) then gaming is not
a bad option. That’s when you want to do something foolish, to forget
about awful things happening around.</p>
<p>My opinion about reading is also changed. It’s not always leisure
reading anymore, since I need to get some valuable things after
spending my time, so I started picking some book related to my
problems, and it hit hards. Yes, leisure reading is good, but it’s
better when you could both enjoy and learn something with it.</p>
<p>That’s enough of ranting, let’s finish it here because I’m freezing rn 🥶.</p>Minh Ngoxminh.ngo.00@gmail.comLiterally how I fvcked myself up in 2022.Abusing technology on simple problems? Please keep yourself sane!2022-09-12T00:00:00+07:002022-09-12T00:00:00+07:00https://9a24f0.github.io/technical-abusive<p>I’ve just extended my contract with the company. It’s good that they
provide us with online signation. However, the experience was completely
reversed. At first glance, it’s cool to have
<a href="https://en.wikipedia.org/wiki/Optical_character_recognition">OCR</a>
applied into the process, which means we could just scan our ID card, without
having to manually input our information. However, it’s a shame when it’s not
working properly. Yes, the system allows us to manually edit the information,
but not the name! I’ve given at least 10 attempts just to get my name scanned
right. Then let me ask you a simple question: Would you rather manually input
your information at first place, or to scan your identity card multiple times
just to get your name, and still have to correct other fields?</p>
<p>Instead of abusing OCR, nowadays with the new ID card which already included
the QR code, which does include you personal information. Then why not using
the much more simple solution? What’s the need of implementing such difficult
approach and results in such awful outcome?</p>
<p>I’ll left a quote to finalize my thoughts:</p>
<p><em>“Work smarter… not harder”</em></p>
<ul>
<li>Allen F. Morgenstern</li>
</ul>Minh Ngoxminh.ngo.00@gmail.comI’ve just extended my contract with the company. It’s good that they provide us with online signation. However, the experience was completely reversed. At first glance, it’s cool to have OCR applied into the process, which means we could just scan our ID card, without having to manually input our information. However, it’s a shame when it’s not working properly. Yes, the system allows us to manually edit the information, but not the name! I’ve given at least 10 attempts just to get my name scanned right. Then let me ask you a simple question: Would you rather manually input your information at first place, or to scan your identity card multiple times just to get your name, and still have to correct other fields?My 2021 Wrapped2021-12-31T00:00:00+07:002021-12-31T00:00:00+07:00https://9a24f0.github.io/2021-wrapped<p>What’s good? What’s bad? And what’s the message for myself in the next year.</p>
<h3 id="what-have-i-achieved-in-2021">What have I achieved in 2021?</h3>
<p>To be honest, none are such special compared to my friends. However, in 2021 I’ve pushed
myself to try many new things, some are successful, some ain’t. Here’s what I’ve done:</p>
<h4 id="my-first-hackathon-uavs-hackatrix">My first hackathon: UAVS Hackatrix</h4>
<p>I’ve been always doubting my ability to be able to contest in a hackathon, which leads
to my scare of contesting. Thanks to Son Hoang, one of my friend have invited me to
take part in UAVS Hackatrix. At first, I still concern about my skills but I accepted
as I see many good teammate (because they might do the heavy-lifting for me 🤣). As
soon as I participated in, I understand that I’m not that bad, and I could still convey
good ideas for the discussion. Besides, I realized that a hackathons ain’t just about</p>
<p>programming, it’s all about the team work of how we could transfer our idea into a
real-life project.</p>
<h4 id="my-first-time-participated-in-hacktoberfest">My first time participated in Hacktoberfest</h4>
<p>Hacktoberfest has been under my radar since the second year in university. However,
until this year that I dedicated time and effort for the festival. Luckily, I could
find some entry level tasks that I could start contribute right-away instead of having
to deeply dive into the source. In addition, I received some cute gifts as a thank from
<a href="https://grafana.com/">Grafana</a>. To know that how the open source organizations
appreciate my little contribution, and to meet such awesome and talented people is my
honor in this year 🥰.</p>
<p><img src="/assets/img/2021-wrapped/hacktoberfest.webp" alt="Hacktoberfest completement announcement" />
<em>Unfortunately the gifts haven’t arrived due to the pandemic so I could only share my completion notice.</em></p>
<h4 id="my-first-time-to-enjoy-traveling-and-to-truly-take-care-of-myself">My first time to enjoy traveling, and to truly take care of myself</h4>
<p>My family ain’t into traveling, and I was not neither. To prepare for the trip, I
had started planning before over 2 months: to buy warm clothes, as well as necessities
and the most important thing: to prepare the mentality since I take the trip on my own,
without my relatives nor my friends. Even the trip started with some small bad lucks, it
turned out in such awesome way that I could never imagined. I had a chance to meet such
nice people during the trekking tour to Mt. Fansipan. The weather contributed an enormous
part in my trip as I could meet such beautiful sky and the sun in the middle of December
in Sapa.</p>
<p><img src="/assets/img/2021-wrapped/fansipan.jpg" alt="Fansipan tour" />
<em>My Fansipan tour - the best memory of my 21.</em></p>
<p>Last but not least, I would want to express my sincere thank to one of my best friend -
Quang. He invited my to join him with the exercise, to keep myself fit and healthy.
I did also take a look and changed my daily meals, for my better health 😉. I started
to pick up some complicated dish to practice cooking, which is fun now, but I have no
believe in myself having this as a hobby.</p>
<h3 id="which-failures-have-i-met-in-2021">Which failures have I met in 2021?</h3>
<h4 id="uavs-hackatrix-be-both-the-angel-and-the-demon">UAVS Hackatrix: Be both the Angel and the Demon</h4>
<p>At first I didn’t put high hopes on the contest. However, when I see the effort of my
teammates, and to see how well I’m contributing for my team. I did believe that we
could at least participate in the final round. However, it is what it is, and we
failed. The result did satisfy my very first and naive goal, but never the latter ones</p>
<h4 id="have-not-completely-given-up-on-gaming">Have not completely given up on gaming</h4>
<p>During the Hacktoberfest and the Hackatrix, I have no time left for the games that
I could easily drop playing. However, right after having some free time, I picked up
the habit of playing. Even I’m fully aware that it would consume a large amount of my
time, it’s still a bad hobby that I could not drop. Yet, I’ve successfully quit
League, and planning to completely give up on spending hours after hours into video
games.</p>
<h4 id="to-control-my-emotions-as-well-as-handling-pressures">To control my emotions, as well as handling pressures</h4>
<p>2021 was a tough year for me - the final year of an undergraduate. Academic pressure
was never easy overcome, yet this year is the worst of all three years. During those
tough times, sometimes I could not control my words and started some conflicts with
the ones around me. Therefore, here is my sincere apology to all of you.</p>
<p><img src="/assets/img/2021-wrapped/apology.jpg" alt="Apologize" /></p>
<p>This year also marked my first job in the industry. Even though I was luckily enough
to join the most funny and solidary team, the work pressure still exists. Especially
when I have just joined the testing project recently and have worked for over 12 hours
per day. Exhaustion caused myself to hide my feelings away from my relatives, which
leads to some misunderstandings that I’m facing right now.</p>
<h3 id="whats-the-message">What’s the message?</h3>
<p>Dear me of 2022,</p>
<p>Please drop playing games, since it took too much of your time!</p>
<p>Please be nice to people around you, they don’t know your problems, but they tried
their best to help you out! Sometimes it’s better to share your emotions, no matter
you are happy or depressed! Yet, stay strong and endurance.</p>
<p>Keep on the good work you have done during your 21. Be more open for the challenges
and let your self have the chances to enjoy your life.</p>Minh Ngoxminh.ngo.00@gmail.comWhat’s good? What’s bad? And what’s the message for myself in the next year.Donghua recommendation: Shiguang Dailiren2021-09-10T00:00:00+07:002021-09-10T00:00:00+07:00https://9a24f0.github.io/shiguang-dailiren<h3 id="what-is-that-d-d-donghua">What is that D-D-Donghua?</h3>
<p>Have you known that Shiguang Dailiren (or Link Click) has claimed the 21th best anime
series on <a href="https://myanimelist.net/anime/44074/Shiguang_Dailiren">MAL</a> and it’s not
even an anime? We all know 2021 is a filled with great shows such as
<a href="https://myanimelist.net/anime/39535/Mushoku_Tensei__Isekai_Ittara_Honki_Dasu">Mushoku Tensei</a>,
or <a href="https://myanimelist.net/anime/41457/86">Eighty-six</a>, but they could not rival the delivery of Shiguang Dailiren. The concept is not new: Cheng Xiaoshi - the one has the ability to travel back in time by replacing the person who took the photo. He partnered
with Lu Guang who could see all the events happens within 12 hours of the photo. Together,
they receive the requests to sneak the information or to deliver unspoken words. With his
ability, Lu Guang provide Cheng Xiaoshi the guidance so that the current timeline is not
affected when his partner carries the missions. This is a new point as all the anime about
time-traveling is abusing the time paradox to create their story where the characters only
want to manipulate the past for the future they want:
<a href="https://myanimelist.net/anime/9253/Steins_Gate">Stein; Gate</a>,
<a href="https://myanimelist.net/anime/31043/Boku_dake_ga_Inai_Machi">ERASED</a>, or currently, <a href="https://myanimelist.net/manga/117032/Bokutachi_no_Remake">Bokutachi no Remake</a>.</p>
<p><img src="/assets/img/shiguang-dailiren/link_click.jpg" alt="Link Click" />
<em>Shiguang Dailiren’s cover photo.</em></p>
<h3 id="what-is-good">What is good?</h3>
<p>This shows probably has the best first episode of all time. It covers both things: give
a complete story (yes, a whole damn complete story) and also being able to introduce
you all the characters, their abilities and the rules. But then you wonder why a first
episode must gives a complete story? Yes, the show walks us through separated stories,
but in the end, where all things are connected and the show starts to assemble with a
clear story, it is gorgeous.</p>
<p>On the other hand, each stories participates on the development of Cheng Xiaoshi because
he inherits the feelings and memories of the person he gain control of when he do
time-traveling. Having a miserable childhood, he empathizes those feelings which lead to
his actions disobey Lu Guang’s guidance. It stir up our curiosity as we all want to know
what will happen in the future when he deflect the past Moreover, the good use of
cliffhanger in the end of each episode lead us to continuously watch the series. Do you
know any masterpiece abuse the cliffhanger? Romance of the Three Kingdoms. And guess
where is it from? Yes, CHINA. So how about giving Shiguang Dailiren a try?</p>
<p>Last but not least, both the OP and ED were phenomenal. I normally skip the both when
watching anime, but not in this case. So please, give it a shot, and you won’t waste
your time 😤</p>Minh Ngoxminh.ngo.00@gmail.comWhat is that D-D-Donghua?Anime Recommendation: Eighty-six2021-06-20T00:00:00+07:002021-06-20T00:00:00+07:00https://9a24f0.github.io/eighty-six<h3 id="what-you-should-know-before-watching">What you should know before watching</h3>
<p>Eighty-six is a new anime this Summer 2021 adapted from the same name light novel and
this probably is the best adaption of the year. Unlike others, episodes of eighty-six
are completely divided into two sections that fully depicts both view of the war: Milizé
major - commander from Republic of San Magnolia and Spearhead Squadron who fought
directly at battle field. This concepts emphasized distance between the two, let
alone Lena’s desperation of not being able to help the squad. Besides, both ED are
written by <a href="https://en.wikipedia.org/wiki/Hiroyuki_Sawano">Hiroyuki Sawano</a> - writer
of many masterpiece: <em>βiοç</em> (Guilty Crown), <em>Ninelie</em> (Kabaneri of the Iron Fortress),
<em>aLIEz</em> (Aldnoah.Zero), etc.</p>Minh Ngoxminh.ngo.00@gmail.comWhat you should know before watchingA trip to Heroku2021-05-26T00:00:00+07:002021-05-26T00:00:00+07:00https://9a24f0.github.io/deployment-hell<h3 id="deploying-on-heroku-is-such-an-easy-task-with-tutorials-are-you-joking">Deploying on Heroku is such an easy task with tutorials are you joking?</h3>
<p>Well, technically yes, but that’s the case when you are using a non-proprietary database.
MSSQL addon on Heroku charged 5$/month, which is a problem with undergraduates who are not
financial independence. In my case, I asked my supervisor to provide me a server and
connects with SQL authentication and this solves the pricing problem. However, this server
was quite old (Microsoft SQL Server 2012 - 11.0.5058.0), and that was the root of all
troubles. I’m not having such privilege to upgrade the server, so I have to work around
with what I have.</p>
<h3 id="everything-starts-with-good-vibe">Everything starts with good vibe…</h3>
<p>Before deploying, I tried to set up a local page to check the settings. Everything was
perfect! Then I install Heroku CLI, start adding buildpacks and again host local web using
Heroku. Everything looks great! With all my confidence, I pushed to Heroku’s git and
deployed the web. Yay, landing page looks cool. Not and all navigations behaves correctly.
Not until I tried to intefere with the database when it responded:</p>
<p><img src="/assets/img/deployment-hell/500.png" alt="Internal Server Error" /></p>
<p>Well, of couse I expect some missteps from myself since this is my first time deploying.
However, this is still strange since I tried host local web using Heroku’s config vars and
nothing went wrong. I reviewed the log, the error was:</p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">'01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)"
</span></code></pre></div></div>
<p>Hmmm, let’s run <code class="language-plaintext highlighter-rouge">odbcinst -j</code> to see what happened:</p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">unixODBC 2.3.6
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /app/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
</span></code></pre></div></div>
<p>When I checked <code class="language-plaintext highlighter-rouge">/etc/</code>, there was no <code class="language-plaintext highlighter-rouge">odbcinst.ini</code>. Surely the Dyno could not find it and
fallback to default setting. Additionally, I forgot to install <code class="language-plaintext highlighter-rouge">msodbc</code>. Having looked
around for solutions, I bumped into a true gold conversation and thanks to
<a href="https://github.com/heroku/heroku-buildpack-php/issues/417#issuecomment-760696609">@boboldehampsink’s suggestion</a>
that I could finally solve this problem. Although I recommend looking at his comment, here
are the steps to reproduce:</p>
<ol>
<li>Add <code class="language-plaintext highlighter-rouge">apt</code> buildpacks</li>
<li>Create an <code class="language-plaintext highlighter-rouge">Aptfile</code>, which contains these following (currently updated with Microsoft)</li>
</ol>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/unixodbc/libodbc1_2.3.7_amd64.deb
https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/unixodbc/odbcinst_2.3.7_amd64.deb
https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/unixodbc/odbcinst1debian2_2.3.7_amd64.deb
https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/unixodbc/unixodbc_2.3.7_amd64.deb
https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/unixodbc/unixodbc-dev_2.3.7_amd64.deb
https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.6.1.1-1_amd64.deb
https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/mssql-tools/mssql-tools_17.6.1.1-1_amd64.deb
</span></code></pre></div></div>
<ol>
<li>Create an <code class="language-plaintext highlighter-rouge">odbcinst.ini</code> file at <code class="language-plaintext highlighter-rouge">/app</code></li>
</ol>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/app/.apt/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.6.so.1.1
UsageCount=1
</span></code></pre></div></div>
<ol>
<li>Set up environment variables by:</li>
</ol>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">heroku config:set ACCEPT_EULA="Y"
heroku config:set ODBCSYSINI="/app"
</span></code></pre></div></div>
<p>Being done with those, you should get your settings like this</p>
<p><strong>Input</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">odbcinst -j
</span></code></pre></div></div>
<p><strong>Output</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">unixODBC 2.3.7
DRIVERS............: /app/odbcinst.ini
SYSTEM DATA SOURCES: /app/odbc.ini
FILE DATA SOURCES..: /app/ODBCDataSources
USER DATA SOURCES..: /app/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
</span></code></pre></div></div>
<p><strong>Input</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">cat /app/odbcinst.ini
</span></code></pre></div></div>
<p><strong>Output</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/app/.apt/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.6.so.1.1
UsageCount=1
</span></code></pre></div></div>
<p><strong>Input</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">ls /app/.apt/opt/microsoft/msodbcsql17/lib64/
</span></code></pre></div></div>
<p><strong>Output</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">libmsodbcsql-17.6.so.1.1
</span></code></pre></div></div>
<h3 id="behind-a-problem-is-another-problem">Behind a problem, is another problem…</h3>
<p>I’ve managed to properly configure driver paths, yet the new problem was:</p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">'08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol] (-1) (SQLDriverConnect)'
</span></code></pre></div></div>
<p>Errr… what? SSL problem? I had again look for various forums. The problem was the
minimum protocol of Ubuntu 20.04 being <code class="language-plaintext highlighter-rouge">TLSv1.2</code>, while old server use <code class="language-plaintext highlighter-rouge">TLSv1.0</code> or
<code class="language-plaintext highlighter-rouge">TLSv1.1.</code> All answers were to modify <code class="language-plaintext highlighter-rouge">/etc/ssl/openssl.conf</code> and to set
<code class="language-plaintext highlighter-rouge">MinProtocol=TLSv1.0</code>. However, since I’m on remote shell, not root, I did not have
privilege to modify such file.</p>
<p><img src="/assets/img/deployment-hell/i-am-not-groot.webp" alt="Not root" /></p>
<p>Besides, my local machine could connect to the server with out changing any
configuration. I rechecked OpenSSL version, and it turned out the version on
Dyno was 1.1.1f compared to 1.1.1k on my machine. Thus I decided to update OpenSSL
<a href="https://github.com/9a24f0/heroku-buildpack-openssl">via a buildpack</a>. Thanks to
<a href="https://github.com/benlast">@Ben Last</a> with his excellent work that I could upgrade
the version with ease.</p>
<p>The last work was to reconfigure <code class="language-plaintext highlighter-rouge">LD_LIBRARY_PATH</code> so that two versions not conflict
with each other. I would rather modify the buildpack to achieve correct path right
away, though seemingly the dyno wiped off <code class="language-plaintext highlighter-rouge">tmp/</code> during deployment. As we all know,
it is what it is, and here are steps to work around:</p>
<ol>
<li>On dyno, run the following command and copy the correct path
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">export LD_LIBRARY_PATH=~/openssl/lib$</span><span class="o">{</span>LD_LIBRARY_PATH:+:<span class="nv">$LD_LIBRARY_PATH</span><span class="o">}</span> <span class="o">&&</span> <span class="nb">echo</span> <span class="nv">$LD_LIBRARY_PATH</span>
</code></pre></div> </div>
</li>
<li>After that, simply set Heroku’s environment variable as
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">heroku config:set LD_LIBRARY_PATH=your-copied-path
</span></code></pre></div> </div>
</li>
</ol>
<p>After this, we achieve such thing as:</p>
<p><strong>Input</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">openssl version
</span></code></pre></div></div>
<p><strong>Output</strong></p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">OpenSSL 1.1.1f 31 Mar 2020 (Library: OpenSSL 1.1.1k 25 Mar 2021)
</span></code></pre></div></div>
<h3 id="conclusion">Conclusion</h3>
<p>So what have I learnt from this? First thing is how to deploy on a cloud VM, where we
were given the resource but not the privilege. Seriously, the problem was not so
complicated as such if I could have a VM to install everything the same as my machine.
But hey, I’ve learnt how to work around with such limited permission, so better give
a thanks for the situation.</p>
<p>Secondly, you should have your system updated. As of currently available Ubuntu 20.04
and 20.10, the OpenSSL version is still <code class="language-plaintext highlighter-rouge">1.1.1f</code>, which could not connect to SQL
Server 12. Normal company would have a life span of more than 10 years with a database
not upgraded. The version that I provided was release on June 2014, and it’s not yet 10
years since then. Upgrade to Ubuntu 21 provides you with <code class="language-plaintext highlighter-rouge">1.1.1j</code>, which solves the
problem directly and without any configuration.</p>
<p>Last but not least, if you could somehow have permission to upgrade the old database,
do it rightaway. I saw many questions about how to connects to a 2008 SQL Server,
which is officially unsupported by Microsoft now. The 2012 version is somehow under
support since the extended date would be July 2022. Yeah I believe my opinion about
upgrading the database will be accepted soon, but we will save it for a rainy day.</p>Minh Ngoxminh.ngo.00@gmail.comDeploying on Heroku is such an easy task with tutorials are you joking?Saving tips?… Maybe?2021-05-06T00:00:00+07:002021-05-06T00:00:00+07:00https://9a24f0.github.io/finance-quiz<p>I recently received a survey from <a href="https://vass.gov.vn/Pages/Index.aspx">VASS</a>
about student’s awareness of personal finance. I found an interesting quiz that
at first make no sense until I took my pen and actually start work on it.</p>
<h3 id="the-problem">The problem</h3>
<p>Assuming that you are setting a saving plans for your retirement at 60. If you
continues to live until 80 and spends 20 million VND each year, how much would
you save in a bank each year, starts from your 30 and given that the rate is 8%
and there will be no inflation.</p>
<p><img src="/assets/img/economy-quiz/quiz.png" alt="The problem" /></p>
<h3 id="initial-thoughts-on-the-quiz">Initial thoughts on the quiz</h3>
<p>At first, I give it a vague guess by removing the base rate. As you taking
total of 400 millions over the last 20 years, you would have to deposit 13.33
millions per year to make up for that savings. However, the only four options I
received was:</p>
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />1.60 mil/year</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />1.73 mil/year</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />1.80 mil/year</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />Don’t know</li>
</ul>
<p>Erm… what? How come you only saves under 2 mil per year for 30 years and
having access to that large savings? Is the rate of 8% gives around 7 times
(1.8 compared to 13.3) your money? Yes, it actually does, and the fun fact
is that you have excess money at 80 if you opt to deposit 1.8 millions per
year. Sounds ridiculous? That’s the story of interest rates.</p>
<p><em><strong>Notes:</strong> The problem is nowhere near realistic situation since no inflation is involved in calculation.</em></p>
<h3 id="lets-start-seriously-do-the-math-shall-we">Let’s start (seriously) do the math, shall we?</h3>
<p>Let \(s\) be our annually saving amount. We start at the end of age 30 and with
the interest rate of 8% per year. We could compute each year’s money till we
retired</p>
<table>
<thead>
<tr>
<th><strong>Age</strong></th>
<th><strong>Saving</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>\(30\)</td>
<td>\(s\)</td>
</tr>
<tr>
<td>\(31\)</td>
<td>\(1.08s + s\)</td>
</tr>
<tr>
<td>\(32\)</td>
<td>\(1.08s^2 + 1.08s + s\)</td>
</tr>
<tr>
<td>\(32\)</td>
<td>\(1.08s^3 + 1.08s^2 + 1.08s + s\)</td>
</tr>
<tr>
<td>\(34\)</td>
<td>\(1.08s^4 + 1.08s^3 + 1.08s^2 + 1.08s + s\)</td>
</tr>
<tr>
<td>…</td>
<td>…</td>
</tr>
<tr>
<td>\(59\)</td>
<td>\(1.08s^29 + 1.08s^28 + ... + 1.08s^2 + 1.08s + s\)</td>
</tr>
<tr>
<td>\(60\)</td>
<td>\(1.08s^30 + 1.08s^29 + 1.08s^28 + ... + 1.08s^2 + 1.08s + s\)</td>
</tr>
</tbody>
</table>
<p>Following this pattern, it is such trivial that when we retired, the amount of
saving would be:</p>
\[\begin{aligned}
R = s \times \sum_{i=0}^{30}(1.08^i)
\end{aligned}\]
<p>Given that \(R\) is the remaining saving, this \(R\) will be reduced when we
retired, as we took money from our savings *winks*.</p>
<p>Now let’s calculate the saving remains from the retirement
<a href="https://www.youtube.com/watch?v=LWLZ_MrPplk">till the day I die</a>.
Since we should immediately withdraw moneys after we retired,
by the end of age 61, we should have</p>
\[\begin{aligned}
R &= (s \times \sum_{i=0}^{30}(1.08^i) - 20) \times 1.08\\\\
&= s \times \sum_{i=1}^{30}(1.08^i) - 20 \times 1.08
\end{aligned}\]
<p>Continues with the pattern, we should achieve this:</p>
<table>
<thead>
<tr>
<th>Age</th>
<th>Remaning</th>
</tr>
</thead>
<tbody>
<tr>
<td>\(61\)</td>
<td>\(s\sum_{i=1}^{31}(1.08^i) - 20 \times 1.08\)</td>
</tr>
<tr>
<td>\(62\)</td>
<td>\(s\sum_{i=2}^{32}(1.08^i) - 20 \sum_{j=1}^2 1.08^j\)</td>
</tr>
<tr>
<td>\(63\)</td>
<td>\(s\sum_{i=3}^{33}(1.08^i) - 20 \sum_{j=1}^3 1.08^j\)</td>
</tr>
<tr>
<td>…</td>
<td>…</td>
</tr>
<tr>
<td>\(80\)</td>
<td>\(s\sum_{i=20}^{50}(1.08^i) - 20 \sum_{j=1}^{20} 1.08^j\)</td>
</tr>
</tbody>
</table>
<p>Thus, assume that we have absolute no money when we passes away
(who needs money to burried with?) we should set an annual saving
at least of:</p>
\[s = \frac{20\sum\limits_{j=1}^{20}(1.08^j)}{\sum\limits_{i=20}^{50}(1.08^i)} \approx 1.72 (mil/year)\]
<h3 id="functional-programming-with-reduce">Functional programming with <code class="language-plaintext highlighter-rouge">reduce()</code></h3>
<p>Since I just looked into functional programming
<a href="https://codewords.recurse.com/issues/one/an-introduction-to-functional-programming">here</a>
, I decided to implement this problem using Python’s <code class="language-plaintext highlighter-rouge">reduce()</code>
just for learning purpose:</p>
<div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="nb">reduce</span>
<span class="k">def</span> <span class="nf">f</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
<span class="n">saving</span> <span class="o">=</span> <span class="n">x</span> <span class="o">+</span> <span class="nb">reduce</span><span class="p">(</span><span class="k">lambda</span> <span class="n">s</span><span class="p">,</span> <span class="n">_</span><span class="p">:</span> <span class="p">(</span><span class="n">s</span> <span class="o">+</span> <span class="n">x</span><span class="p">)</span> <span class="o">*</span> <span class="mf">1.08</span><span class="p">,</span> <span class="nb">range</span><span class="p">(</span><span class="mi">31</span><span class="p">))</span>
<span class="n">remain</span> <span class="o">=</span> <span class="nb">reduce</span><span class="p">(</span><span class="k">lambda</span> <span class="n">s</span><span class="p">,</span> <span class="n">_</span><span class="p">:</span> <span class="p">(</span><span class="n">s</span> <span class="o">-</span> <span class="mi">20</span><span class="p">)</span> <span class="o">*</span> <span class="mf">1.08</span><span class="p">,</span> <span class="nb">range</span><span class="p">(</span><span class="mi">20</span><span class="p">),</span> <span class="n">saving</span><span class="p">)</span>
<span class="k">return</span> <span class="n">remain</span>
</code></pre></div></div>Minh Ngoxminh.ngo.00@gmail.comI recently received a survey from VASS about student’s awareness of personal finance. I found an interesting quiz that at first make no sense until I took my pen and actually start work on it.Microsoft Office, huh? Not my type!2021-02-01T00:00:00+07:002021-02-01T00:00:00+07:00https://9a24f0.github.io/intro-latex<p>I’m a third year student and about to graduate. During my studie-ing process,
I had to write a decent chunk of papers and reports, and none of those report
and slides was written using office’s tool like Word or Powerpoint. So why
I’m become so hated of office’s tool? And what I used to replace those?</p>
<h3 id="jesus-christ-windows-is-buggy-as-hell">Jesus christ Windows is buggy as hell</h3>
<p>The very first reason is that I’m not having good experience with the
operating system itself. Windows does update very often, but those minor
bugs still remains. I’ve suffered freezing of touchpad from the beginning
of first year second semester till the very end of my second year. However,
I have to thank this bug since it give me reason and opportunity to start
using Linux.</p>
<p>I still keep Windows as an entertainment platform as most games runs on it
and I don’t want to mess up my work environment by installing emulators
such as <a href="https://www.winehq.org/">WINE</a>. And look at what Windows gave me
when I tried to boot it up to start playing some games:</p>
<p><img src="/assets/img/intro-latex/cursed.png" alt="Image" /></p>
<p><em>I know that’s kinda messy cuz I don’t use it much but hooley shiet
look at that crashed fonts!</em></p>
<h3 id="new-era-of-online-tools">New era of Online tools</h3>
<p>As our university encourages collaboration between students, they often
offers large-enough-projects to make us, student, to work in a group of
3 to 5 people. With offline Office tools, we struggle between sharing
papers, and dividing works seems like a difficult task. On the other hand,
online tools like Gdocs offers alot in term of real-time working as different
people could access and edit the same file, as well as communicate via
comments and chat box. Therefore, we shifted toward using available online
tools to write papers.</p>
<p>For presentation and project defense, we could also use Google Slides
instead of offline PowerPoint. Of course there won’t be some fancy
transition effects or animations but that’s more than enough for the
presentation. Also, the more flashy you put into the slides, the more
distract listener will be. Hence, the use of Google Slides is prior
than the use of Powerpoint in our university (or at least our department).</p>
<h3 id="latex-the-sleeping-beauty">LaTeX, the sleeping beauty</h3>
<p>What if I tell you, there is a text editor, that is much more beautiful
than your familiar Office Word? Yes, LaTeX with default font is stunning
for writing papers. Moreover, it does support rendering proper Mathematical
functions and symbols.</p>
<p><img src="/assets/img/intro-latex/math-func.png" alt="Image" /></p>
<p><em>This is my answer to a very elementary problem, but look at these
Mathematical symbols!</em></p>
<p>Not only that, it also renders code blocks, which is very helpful for students
majoring in ICT like us.</p>
<p><img src="/assets/img/intro-latex/math-func.png" alt="Image" /></p>
<p><em>A Python code block is perfectly rendered!</em></p>
<p>For making slides, we could use beamer, a LaTeX document class. With the
introduction of frame, and the help of LaTeX theme, we are able to make
pretty slides. There will be no transitions effects as well as no animations,
but as the trade off of having pretty Mathematical symbols, we take those.</p>
<h3 id="what-if-we-combine-both-of-the-above">What if… we combine both of the above?</h3>
<p><img src="/assets/img/intro-latex/meme.jpg" alt="Image" /></p>
<p><a href="https://www.overleaf.com/">Overleaf</a> is a well-known tool for editing LaTeX
online. It also has a lot of documents to guide new comers. Overleaf is also
my very first choice when writing reports or making slides. Therefore, why
not start using it right now?</p>Minh Ngoxminh.ngo.00@gmail.comI’m a third year student and about to graduate. During my studie-ing process, I had to write a decent chunk of papers and reports, and none of those report and slides was written using office’s tool like Word or Powerpoint. So why I’m become so hated of office’s tool? And what I used to replace those?