content: move notes from previous website
This commit is contained in:
parent
483b767740
commit
ee7b767482
6 changed files with 189 additions and 0 deletions
31
_posts/2010-01-05-good-practice.md
Normal file
31
_posts/2010-01-05-good-practice.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: "Good Programming Practices"
|
||||
permalink: /good-programming-practices/
|
||||
category: technology
|
||||
description: Some thoughts on practices that make programming better
|
||||
published: true
|
||||
---
|
||||
I want to talk about programming and some practices that, I think, can make a programmer more efficient when observed. First, let's talk about what programming is.<!--more-->
|
||||
|
||||
### Programming as Problem Solving
|
||||
- Programming is basically writing down code to instruct computers how to solve problems.
|
||||
- This means that there may be as many ways to code a program as there are ways to solve a problem.
|
||||
- A particular solution may be correct, but it could also be a bad/inefficient solution.
|
||||
- Never settle for correct but inefficient solutions.
|
||||
- A good programmer does not only solve problems... he does it well/efficiently.
|
||||
- To do this, one must observe good programming practices.
|
||||
|
||||
### Good Programming Practices
|
||||
Here are some points I try to observe while programming:
|
||||
1. Think of the most appropriate data structures for the problem at hand. Don't do everything in arrays. Remember that there are other ways to represent your models than the common, out-of-the-box data types (i.e., linked lists, trees, heaps, queues, etc.)
|
||||
2. Think of the most efficient algorithm.
|
||||
3. It does not hurt to lint your code. Code linting is arguably the easiest and fastest thing you can do to make sure your code is clean. Learn how to configure code linting so that it becomes natural to your programming practice. Linting detects problematic patterns in your code that might result into bugs and even some lines that are not following a certain style guide.
|
||||
4. Follow a style guide.
|
||||
5. Writing code is very much like writing literature in the sense that you get better at it as you read and read and read good code from experienced programmers. Read code by experienced programmers. If you don't have access to these experienced programmers in your immediate circle, you can always go to [Github](https://github.com).
|
||||
6. Make it easier for others to debug / check your code. Make it as human readable as possible, without sacrificing code efficiency and simplicity.
|
||||
7. Code [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself). Meaning, Don't Repeat Yourself. Make new methods / functions for lines of code you frequently repeat, make your code design module for reusability. DRY coding is the opposite of WET conding which means "Write Everything Twice" or "We Enjoy Typing" or "Waste Everyone's Time" ... you get the idea.
|
||||
8. Peer Programming or just having your code reviewed by other programmers is also a good practice.
|
||||
|
||||
### Further Readings for Good Programming Practices
|
||||
|
||||
1. [A Pragmatic Quick Reference](https://blog.programminghorror.com/a-pragmatic-quick-reference/) - a good summary of the book [The Pragmatic Programmer: From Journeyman to Master](https://www.amazon.com/exec/obidos/ASIN/020161622X/codihorr-20)
|
53
_posts/2018-10-07-mailchimp-and-lotus-notes-issue.md
Normal file
53
_posts/2018-10-07-mailchimp-and-lotus-notes-issue.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
title: "Mailchimp + Lotus Notes Solution for HTML Email Campaigns"
|
||||
permalink: /mailchimp-lotus-notes-fix/
|
||||
category: projects
|
||||
description: Notes on how I fixed a client's problems with MailChimp and Lotus Notes
|
||||
published: true
|
||||
---
|
||||
|
||||
I had a client once using one WYSIWYG (What You See Is What You Get) tool for designing HTML Email campaigns... but they are not getting the results they want to see. The HTML email designs are chaotic when received in their readers' computers.<!--more-->
|
||||
|
||||
## The Problem
|
||||
|
||||
The client's readers use Lotus Notes for reading their emails. The problem is, Lotus Notes may not always display HTML emails as expected. Instead, it displays HTML emails in a proprietary rich-text format. This means that Lotus Notes, as an email reader, uses its own standards in rendering HTML emails that is quite different compared to all other popular email readers (i.e., Gmail, Outlook, etc.).
|
||||
|
||||
There are HTML elements that Lotus Notes simply does not understand. To make things more complicated, different versions of Lotus Notes have different rendering standards. This means that creating an HTML email template that works for one Lotus Notes version does not guarantee it will work on others.
|
||||
|
||||
This is why HTML Email designers hate Lotus Notes the most--pretty much like Internet Explorer for Web Developers.
|
||||
|
||||
|
||||
## Findings on Lotus Notes HTML email rendering
|
||||
|
||||
Lotus Notes has several issues with widely accepted HTML standards because of its own proprietary rich-text formatting. Here are some of these issues that can be found if you search the web:
|
||||
- COLSPANS. These are attributes of table cells to tell the email client or the browser how many columns they span over. Lotus Notes cannot seem to understand this and we might need to just use multiple tables as a workaround.
|
||||
- CENTER ALIGNMENT. Using `<TABLE ALIGN="CENTER">` worked great in Lotus Notes 6.5.3. But not at all in Lotus Notes 6.5.4. Also, `<CENTER>` tags around the tables didn’t work in 6.5.4 either. We can make things simpler as a workaround so they'd look okay as left-aligned in 6.5.4.
|
||||
|
||||
|
||||
## Other Possible Workarounds and Good Practice
|
||||
Here are some helpful tips in designing HTML emails for Lotus Notes:
|
||||
- Use Mail Chimp's `*|ARCHIVE|*` merge tag to automatically generate a link to the online version of your MailChimp campaign. Subscribers can click this link to view your campaign directly in their web browsers.
|
||||
- Allow your subscribers to choose which version of your campaign they want to receive when they sign up to your list: HTML, Text, or Mobile. If they have difficulty viewing HTML email, they can select the Text option instead.
|
||||
- Keep your designs simple so that if they fail, your email is still readable.
|
||||
|
||||
## Suggestion on Campaign Creation Workflow
|
||||
The WYSIWYG tool I mentioned earlier, is one that is provided by Mailchimp. This tool is great. I recommend it... if your readers' does not use Lotus Notes.
|
||||
|
||||
Mailchimp’s Drag and Drop tool for creating Email Campaigns generates HTML code that tries to make the campaign look good in many popular email programs. Unfortunately, Lotus Notes does not play well with most of these programs’ HTML rendering standards.
|
||||
|
||||
To make sure the Campaign will look good in Lotus Notes, we have to clean up the code that Mailchimp generates.
|
||||
|
||||
Follow these steps to clean up the HTML email design:
|
||||
- Save Campaign as Template. To do this, Go to Campaigns page, Edit your Campaign, then click “Save as Template”. This is necessary because Mailchimp only allows Exporting to HTML from Templates.
|
||||
- Export Template to HTML. Once the Campaign is saved as a Template you can now export it into HTML code that we can clean up. Go to Templates page, click the dropdown button beside the Edit button on the Template, then select “Export as HTML”
|
||||
- Clean Up the HTML Code. Once you select the “Export as HTML” option, a file will be downloaded to your computer. Open this file in a Text Editor then do the following:
|
||||
- Add Lotus Notes specific elements.
|
||||
- In the HTML code you downloaded, you will most probably find a line with this code: `<!--[if gte mso 9]>` … replace all occurrence with `<!--[if (gte mso 9)|(IE)]>`
|
||||
- Lotus notes Microsoft’s Internet Explorer (IE) to render HTML emails.
|
||||
- Remove style rules intended for smartphones.
|
||||
- In the HTML code, if you find @media{ … } rules inside the `<style> ... </style>` tags, you may remove it.
|
||||
- These @media{ ... } rules are intended for smartphones and may not play well with Lotus Notes.
|
||||
- Make CSS style rules inline. As much as possible, apply style rules found inside the `<style> ... </style>` tags as inline styles to the elements. As of writing this blog, Mailchimp has an automatic inline feature to do this. Just check the checkbox in the design settings and Mailchimp will automatically do this for you.
|
||||
- Upload the Clean HTML Code into Mailchimp. Once you have done the cleaning up steps, you can go back to Mailchimp then create a Campaign using the new HTML Email. Create a Campain then choose HTML Email, then paste the code from the Text Editor you used.
|
||||
- Test the how the HTML Email looks. Mailchimp provides a paid feature called Inbox Preview to see how the HTML Email renders in several popular Email programs. If you are on a free account, you can use Preview Mode instead. Another option is opening an account in Litmus (http://litmus.com) which gives you screenshots of the HTML Email rendered in various Email Programs (including versions of Lotus Notes).
|
||||
|
38
_posts/2019-08-20-choosing-your-first-language.md
Normal file
38
_posts/2019-08-20-choosing-your-first-language.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: "Choosing Your First Programming Language"
|
||||
permalink: /choosing-a-programming-language/
|
||||
category: technology
|
||||
description: Some thoughts on deciding which programming language to pick first
|
||||
published: true
|
||||
---
|
||||
|
||||
When learning programming for the fist time, I believe it is important to decide what programming language you will study first.<!--more-->
|
||||
|
||||
There is quite a lot of programming languages out there, but not all are friendly for beginners.
|
||||
|
||||
So far, there are two programming languages that rise above the rest when it comes to friendliness to first-time programmers: C and Python.
|
||||
|
||||
The main difference between the two as options for learning programming could be likened to your options when learning to drive cars--would you like to try out an automatic or a manual?
|
||||
|
||||
Learning in Python is much like learning how to drive a car with an automatic transmission.
|
||||
|
||||
You don't have to mind much of the what's happening under the hood, and what's happening is often abstracted to you.
|
||||
|
||||
For an example, you don't have to worry about memory allocation. Whereas in C, you have more control: you're driving a manual.
|
||||
|
||||
I learned programming for the first time in C.
|
||||
|
||||
This, I believe, made it easier for me to learn other languages and understand how the computer works.
|
||||
|
||||
For this reason, I find Python a little lacking when it comes to control.
|
||||
|
||||
But I also understand Python is easier to learn and use for beginners who just wants to start coding and doesn't really plan to dive deep into computers.
|
||||
|
||||
This is why, I think, many tutorials and classes for beginners use and recommend Python.
|
||||
|
||||
If you have a particular problem you want to solve, you will have to consider other factors in choosing your programming language.
|
||||
|
||||
Remember, I'm not talking about which language is more powerful (though I would still pick C).
|
||||
|
||||
Rather, I'm just bringing up the difference of the two languages when it comes to friendliness for first-time programmers.
|
||||
|
67
_posts/2019-08-26-bayanihan-basurahan.md
Normal file
67
_posts/2019-08-26-bayanihan-basurahan.md
Normal file
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
title: "Bayanihan: Basurahan"
|
||||
permalink: /feels-fm/
|
||||
category: projects
|
||||
image: garbage
|
||||
description: A project to address garbage management in cities
|
||||
published: true
|
||||
---
|
||||
|
||||
With some of my most talented techie friends, I am now on a mission to create a simple solution to a big problem: that the Philippines is one of the least disciplined countries in garbage disposal.<!--more-->
|
||||
|
||||
Studies upon studies show that this problem even leads to hazards such as flooding, which poses a great danger to the lives of millions of poor Filipinos.
|
||||
|
||||
Now, why does it seem that we don't talk about it as much as we should?
|
||||
|
||||
---
|
||||
|
||||
## The Problem
|
||||
|
||||
Notice that no matter how much mess we have in the "real world" we don't often talk about it online. We see politics, happy photos, and achievements, but rarely do we see messy locations shared on our social media streams.
|
||||
|
||||
This is because our smartphones and computer screens have become our primary "window" to the world, and it is addicting because we have control over what our screens show us.
|
||||
|
||||
We like kitties, we don't like trash.
|
||||
|
||||
Out of sight, out of mind.
|
||||
|
||||
---
|
||||
|
||||
## Our Solution
|
||||
|
||||
But what if we have a system that could capture the country's state when it comes to garbage disposal and bring this to people's attention? Would it spark conversations? Could it aid in creating policies that might bring people to action and even prevent floods?
|
||||
|
||||
I think so.
|
||||
|
||||
This is why in the past week, I have asked some of my techie friends to join me as I start a new quest.
|
||||
|
||||
---
|
||||
|
||||
## The Quest
|
||||
|
||||
We are going to create a mobile application that:
|
||||
1. Allows users to snap photos of different garbage dumps (legit or not), rate the location, and upload it
|
||||
2. Has a system for users to validate other users uploads
|
||||
3. Provides some visualizations such as a map of points and a heatmap similar to the following:
|
||||

|
||||
*Photo from a screenshot of: https://yosmhm.neis-one.org*
|
||||
|
||||
---
|
||||
|
||||
## The Hope
|
||||
|
||||
With this mission I hope to:
|
||||
1. Bring the problem back in front of people's faces. :)
|
||||
2. Spark conversations and actions.
|
||||
3. Aid NGOs and LGUs in policy-making.
|
||||
|
||||
<!-- --- -->
|
||||
|
||||
<!-- ## Please Join Us
|
||||
|
||||
Interested to join us in our quest? Have suggestions or inquiries? Please let us know what you think.
|
||||
|
||||
You can sign up to chat with us: [Tech4GoodPH Slack Invitation](https://docs.google.com/forms/d/e/1FAIpQLScPt5WgyStjvpIsvlst1KRNP0b95gw8o2mzDwBN3JccDxSCDA/viewform?usp=sf_link)
|
||||
|
||||
Or you can email us at <a href="mailto:tech4good.pm.me">tech4good@pm.me</a> -->
|
||||
|
BIN
assets/images/garbage.jpg
Normal file
BIN
assets/images/garbage.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 121 KiB |
Loading…
Reference in a new issue