Aurora BorealisThe Northern Lights
http://za.github.io/
Django Post Idea<p>Wow, it’s already 2019! And I just skipped 2018 without even a single post! For
this post, I just want to write short.</p>
<p>So far, I have two ideas on writing a new post. They are:</p>
<ul>
<li>Migrating legacy Django hash password</li>
<li>Testing Django form with real data</li>
</ul>
<p>Let’s hope I can write this soon. See you!</p>
Tue, 22 Jan 2019 02:20:00 +0000
http://za.github.io/2019/01/22/django-post-idea/
http://za.github.io/2019/01/22/django-post-idea/Improve Programmers Skill<p>Recently, I attended <a href="https://pycon.my/2017/09/01/pycon-apac-2017-its-a-wrap/">PyCon APAC 2017</a>
which was held in Kuala Lumpur, Malaysia. It’s always nice to meet new people
and share stories.</p>
<p>It turned out, the most interesting talk for me was one of the session in lightning
talk. It was delivered by Ivan.</p>
<p>Ivan shared that programmers should always upgrade their skill and it can’t be
done by working on our daily routine. We should take class, do some side
projects, or even try some code contest.</p>
<p>For example, solving a simple problem but only using the standard library. If
most of the time we are requests library to make HTTP access, now try not to use
requests library. Instead just use Python standard library.</p>
<p>I definitely want to always upgrade my skill. I just have to find the time and
the method that suits me. I found reading still important, but I guess problem
solving still the best way to practice.</p>
Tue, 12 Sep 2017 15:20:00 +0000
http://za.github.io/2017/09/12/improve-programmers-skill/
http://za.github.io/2017/09/12/improve-programmers-skill/Test Python/Django Script<p>Now I am thinking a better approach on testing Python/Django script. I have a
Python script which runs in a Django application. For example, this script will
send an email with how many new users registered in this week.</p>
<p>So far, I use the manual approach, which requires me to have new user registered
within this week. I am not very satisfied with this approach, as the script is
getting complex, I need to manually prepare the data.</p>
<p>Any idea?</p>
Mon, 27 Mar 2017 15:00:00 +0000
http://za.github.io/2017/03/27/testing-python-django-script/
http://za.github.io/2017/03/27/testing-python-django-script/Fail Running Test Code<p>I was recalling, how did I run the test code. Until I found that I had written
the snippet. I copy-paste it… and the test code was fail. Something wrong. No
changes in the test code since my last commit.</p>
<p>I tried the other test code. Looks OK. I tried to rename the fail test code
filename, still no good. So, what’s the problem?</p>
<p>Until I found this <a href="http://stackoverflow.com/questions/25575073/attributeerror-module-object-has-no-attribute-tests">stackoverflow
question</a>.</p>
<p>So, I tried to import the modules written in the test code via shell. Finally
now I know which part of the code that fails to import the library.</p>
Wed, 26 Oct 2016 16:56:24 +0000
http://za.github.io/2016/10/26/django-test-code/
http://za.github.io/2016/10/26/django-test-code/MelbDjango Camp<p>It’s almost a month passed by from <a href="https://melbdjango.camp/">MelbDjango camp</a>.
I was planning to write a short review about it. So, let’s just give it a start.
Better late than never.</p>
<p><img src="https://melbdjango.camp/static/images/MDjC.png" alt="MelbDjango Camp" /></p>
<p>For me, Django community in Melbourne has been a very vibrant community. You
name it! They have meetups, school, hack weekend and lastly the camp initiative.
And I’ve learned a lot from the community.</p>
<p>The camp lasted for two days and two nights. Basically we working on our own
Django projects. And when you got stuck on something, there’s always someone who
will help you.</p>
<p>I was working on two Django projects. The first one, I was trying to visualize a
Django app using d3.js Then the second one, I was trying to build a geographic
information Django app. I also learned how to setup Django using PostgreSQL as
the backend.</p>
<p>Other than that, there were three workshops. The first one was Django-low down
(Django slow down). We’re going through the Django docs and start creating a
Django application from the scratch.</p>
<p>The second was creating a vulnerable Django application. The reason was to
prevent creating a vulnerable application by getting know what is a vulnerable
Django application.</p>
<p>And the last workshop was about Django template. What has Django template
working for us, why Django template is slow, and so on.</p>
<p>This camp was a great experience for me! I knew about redshift: an app that
adjust your computer screen according to your position. At first I was surprised
when I saw other’s monitor screen turning into red. Then I knew how to work
on Django project tickets.</p>
Wed, 16 Dec 2015 16:56:24 +0000
http://za.github.io/2015/12/16/melbdjango-camp/
http://za.github.io/2015/12/16/melbdjango-camp/MPUG June Meetup: Interactive Visualization in Python<p>So it was the first Monday of the month. I didn’t realize it until Ed posted on the mailing list. <a href="https://wiki.python.org/moin/MelbournePUG">Melbourne Python User Group</a> meets every first Monday of the month (except January). I read Ed’s email at 3.30 PM and I still need to catch the train to city.</p>
<p>Luckily, I could made it on time. So I helped with arranging seats. Soon, Ed started his talk. Ed gave introduction about what’s MPUG, what’s new in Python, the next <a href="http://2015.pycon-au.org/">PyCon AU</a> including the <a href="http://2015.pycon-au.org/media/news/28">financial assistance</a>, and also let the attendees introduced themselves.</p>
<p><img src="https://farm9.staticflickr.com/8788/17753436054_d2797cbc58_z_d.jpg" alt="Ed Schofield" /></p>
<p>Visualization. It’s an interesting topic for me although I don’t have the chance on visualizing anything yet. Ed started with <a href="http://d3js.org/">d3.js</a> a javascript library. Since d3js is for web page, how we visualize in Python? Then Ed shared on <a href="http://matplotlib.org">matplotlib</a>. Ed showed the rubix cube game which created using Python. It was written with around 400 lines of code. Then <a href="http://mpld3.github.io/">mpld3</a> which stands for matplotlib to d3.</p>
<p>I recorded a <a href="https://flic.kr/p/tH2MhE">10 seconds video</a>, interactive visualization in IPython notebook. My favourite was the spectrogram visualization, but too bad I didn’t record it. One of the attendees asked where the sound input comes from. Ed answered it was processed using pyaudio library. Since google hangout receives audio input from the browser, it might be a good idea to try audio input from the browser.</p>
<p>The last library that Ed mentioned was the <a href="http://bokeh.pydata.org/en/latest/">bokeh</a> library.</p>
<p>There were only around 10 people who attended the meetup. Probably it was because the first day of winter. But after all, it was a nice meetup!</p>
Thu, 04 Jun 2015 11:50:20 +0000
http://za.github.io/2015/06/04/mpug-interactive-visualization/
http://za.github.io/2015/06/04/mpug-interactive-visualization/Python: Getting Started with Testing by Ned Batchelder<p>This post is for my personal bookmark. Since I am new to testing, this <a href="https://youtu.be/FxSsnHeWQBY">video</a> is really helping me on getting started with testing in Python. And do you know what makes it so great? Ned also provides <a href="http://nedbatchelder.com/text/test0.html">the complete write up</a> of his presentation! So if I don’t have time to watch the video completely, I could jump to his write up.</p>
Thu, 14 May 2015 11:55:20 +0000
http://za.github.io/2015/05/14/getting-started-python-testing-ned-batchelder/
http://za.github.io/2015/05/14/getting-started-python-testing-ned-batchelder/Melbourne Django Hack Weekend<p>Wow, it’s already March 2015 and I haven’t written anything since then here.</p>
<p>On March 9, it was public holiday at Victoria. So it was a long weekend. I received invitation to join melb-django hack weekend. Since I didn’t have any schedule yet, I decided to join and get ready for my first time hack experience.</p>
<p>The hack weekend lasted for two days: on Sunday March 8 and on Monday March 9. Unfortunately I could only joined on Sunday. Actually it will be great if I could join the second day, because on the first day I spent most of my time for setting up the environment.</p>
<p>Since no one had an idea what django project/app to hack, Curtis decided to continue the previous hack project which was <a href="https://github.com/funkybob/django-dequorum">django-dequorum</a>. Curtis explained what is django-dequorum and what features which is undone. django-dequorum is a simple forum django application. Users could post threads and other users could make comments. To make things easier what things need to be done, Curtis put them on the <a href="https://github.com/funkybob/django-dequorum/issues">github issues</a>. And we agreed that we will use git flow to hack this django-dequorum. Everyone will fork and make pull request to contribute to this project.</p>
<p>Suddenly, it was 12.30 So we decided to have lunch before we hack django-dequorum. We walked to Lenthil, a unique canteen at Abbotsford. They provide vegetarian menu. They didn’t charge on how much we ate. They put poster explained how they run this canteen and how much does it cost. We put the money inside a box.</p>
<p><img src="/images/2015-03-melb-django-dequorum.jpg" alt="Walking to Lenthil" /></p>
<p>After lunch, Nicole took the initiative to do the look and feel. Nicole drew the layout.</p>
<p><img src="https://cloud.githubusercontent.com/assets/3323703/6544386/81bd5b9a-c5a1-11e4-8ffc-4b710d523558.jpg" alt="Drawing layout" /></p>
<p>I didn’t join the layout discussion because I was still struggling with the environment setup. At first I setup my environment with python 2.7.x and later I found that they are using python3. So I re-set up my virtualenv.</p>
<p>And then I was confused. I didn’t want git to track changes on the django project directory but I wanted git to track changes on django-dequorum app. I put a symbolic link, still failed. I finally managed with <em>folder</em> symbolic link.</p>
<p>Other problem raised after we forked the github repo. How to keep our forked repo updated with funkybob repo? Since I had this problem before so I already knew the answer. I helped my friends on how to add another git remote repository.</p>
<p>I still didn’t make any commits to this open source project, but hopefully I could contribute in the future. It was a nice hack weekend with friendly new friends.</p>
Wed, 18 Mar 2015 07:18:20 +0000
http://za.github.io/2015/03/18/melb-django-dequorum/
http://za.github.io/2015/03/18/melb-django-dequorum/Photo from MPUG August 2014<p>Here are photos from <a href="https://wiki.python.org/moin/MelbournePUG">MPUG Meetup</a>. For meetup review, you may want to read <a href="http://www.curiousvenn.com/2014/08/notes-from-mpug-august-2014/">Graeme Cross</a>’s notes.</p>
<p><img src="/images/mpug-201408-javier.jpg" alt="Don’t monkeypatch None!" /></p>
<p><img src="/images/mpug-aug-2014.jpg" alt="SciPy 2014: a summary" /></p>
<p><img src="/images/mpug-201408-microservices.jpg" alt="Microservices in Python" /></p>
<p><img src="/images/mpug-201408-vimception.jpg" alt="sux" /></p>
Sun, 14 Sep 2014 04:08:20 +0000
http://za.github.io/2014/09/14/mpug-august-2014-photo/
http://za.github.io/2014/09/14/mpug-august-2014-photo/PyCon APAC 2014 Videos<p>After almost <a href="https://tw.pycon.org/2014apac/en/">two months</a>, finally <a href="http://www.youtube.com/channel/UCHLnNgRnfGYDzPCCH8qGbQw">the PyCon APAC 2014 videos</a> have been released! <em>(actually it has been uploaded two weeks ago)</em></p>
<p><img src="/images/pyconapac2014-video.png" alt="PyCon APAC 2014 Video" /></p>
<p>It was my first PyCon and also it was my first time experience <a href="http://www.youtube.com/watch?v=nMxiKcgoWZo">speaking at PyCon</a>. I shared my experience on using Python to perform <a href="https://speakerdeck.com/za/python-for-application-security-testing">application security testing</a>.</p>
<p>However I still couldn’t find the <a href="https://tw.pycon.org/2014apac/en/program/keynote-speakers/">keynote speaker</a> videos available online. Tracks that I attended and already available online are: <a href="http://emptysqua.re/blog/pycon-apac-2014-recap/">A. Jesse Jiryu Davis</a> <a href="http://www.youtube.com/watch?v=BOKcZjI5zME">talk</a>, <a href="http://www.youtube.com/watch?v=259sgRMHso0">Social Network Analysis with Python</a>, <a href="http://www.youtube.com/watch?v=YzVvZ9HPrn8">Statistics in Python with R</a>. I remembered I was sitting in front of R3 room at A. Jesse Jiryu Davis’s talk hence there were so many attendess. That’s why I could take a great shot from where I sat.</p>
<blockquote class="twitter-tweet" lang="id"><p>The attendees during <a href="https://twitter.com/jessejiryudavis">@jessejiryudavis</a> talk <a href="https://twitter.com/hashtag/pyconapac2014?src=hash">#pyconapac2014</a> <a href="http://t.co/WfvXXHVAPJ">pic.twitter.com/WfvXXHVAPJ</a></p>— za (@zakiakhmad) <a href="https://twitter.com/zakiakhmad/statuses/468413809204269056">19 Mei 2014</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>It’s very nice to meet so many people who share the same interest. It was a very great experience for me, for being one in six-hundreds Pythonistas. Even, the Taiwan Pythonistas are very kind and generous. <a href="http://twitter.com/jacksctsai">Jack Tsai</a> allowed me to stay at his place for one night in Hsinchu by the time I arrived at Taiwan Taoyuan International Airport.</p>
<p>I believe in a <em>circle</em>. We must be in a right circle to help us improve our self. That’s why I try consistently organizing a bimonthly <a href="http://python.or.id">Python Indonesia</a> <a href="http://www.meetup.com/Python-ID/">meetup</a>. We haven’t had six-hundreds Pythonistas yet. Having our own <a href="https://twitter.com/pyconid">PyCon Indonesia</a> sure it’s still a long way to go. But we believe with this small meetup it will make a difference in the future, as long we can keep it consistent.</p>
<p>Last words. Sure, I realize still need to learn and practice more about Python. And … thank you for the PyCon APAC 2014 organizer for organizing such a great events. Thank you Jack Tsai for the hospitality. Thank you Tzer-jen Wei for taking me to Hualien and have <a href="http://za.github.io/2014/06/13/xiuguluan-river/">rafting at Xiuguluan River</a>. Thank you Fernando Perez and Andreas Klockner for a wonderful time spent with.</p>
Fri, 11 Jul 2014 10:47:20 +0000
http://za.github.io/2014/07/11/pycon-apac-2014-video/
http://za.github.io/2014/07/11/pycon-apac-2014-video/