React is advertised as quite fast out of the box. In extreme cases when your app hits performance problem, you just have to optimize the re-rendering process by shallow comparing React props and state inside shouldComponentUpdate lifecycle function. The strategy for optimizing seems quite straight-forward.

However I found that this strategy is less clear in a React/Redux environment. Here are some advices that you should considering when...

Read more

According to the same-origin security policy, web page can freely share images, stylesheets, scripts… but web fonts and AJAX requests are only accessible from the same domain.

Sometimes this is not desired behaviour, such as when getting a json / xml file from a different domain, using AJAX. In such cases, it all comes down to two solutions :

1- The source sets its header to allow specific domain cross-origin...

Read more

My FOSSASIA project is taking a big transitioning step from the starting plan. In milestone 3 and 4, rather than focusing on statistical retrieval and API documentation wepapp, my mentors - Mario (@mario) and Andreas (@andibraeu) are guiding me towards integrating fossasia api data in other services. The main goal remains the same though : getting more people to use and to know about the API.

Integrating our...

Read more

On the /user edge, user pictures url are not returned by default, and when users ask for it, the response image is not in biggest format. This query should get the largest user pictures associated with post :


There are other use cases where this syntax applies as well

  • get comments of a feed

I am a frequent user of popular social platforms API : Facebook, Twitter, Instagram.. Among others, Facebook Graph API is the API I’m most familiarized with, and despite its lack of documentation, Graph API makes me from time to time admire the engineering mind of those who built it. It’s simple, has a clear design, and communicates a consistent philosophy. I inspired a lot from it to implement
Read more

Calendario is a lightweight calendar library that I happen to find on the net. Their approach to calendaring solution is rather unique : it’s not a full-blown library like jQuery FullCalendar where everthing is ready to be used. With Calendario, calling init function simply generates plains html source code. The styling part is completely up to user.

Another plus is it’s lightweight (350 lines of code more or...

Read more

ICalendar is a file format residing under RFC 5445, to represent and exchange calendaring and scheduling information. The file extension is generally .ics, and .iCal for Apple software. The aim was to define a standard format that could be understood everywhere, independent of calendar vendors : Google Calendar, Apple iCal, Yahoo! Calendar, Mozilla Lightning, Microsoft Outlook… Nevertheless, true interoperability doesn’t seem to be the reality. My next...

Read more

Exception, perception, and knowledge are things that fade away. The truth is that your memory betrays you all the time by erasing (without asking you a word !) all your experience about things that you used to know. If you are old enough to forget how awesome your childhood was, and are frustrating because you do, you’ll understand what I mean.

The problem is, experience is often very valuable, even...

Read more

Image broken

As a warm up task for my GSoC project, I want to embed a map to the FOSSASIA API generator form as a convenient way for users to provide their location coordinates. When the user clicks on a location on the map, two input fields Latitude and Longitude will be automatically updated with fresh values. Here’s how.


Read more