N. Ganesan Blog

0 views
Skip to first unread message

Arnold Gilgen

unread,
Aug 3, 2024, 2:55:40 PM8/3/24
to prorriatabgui

I wanted to update my old portfolio site for some time and wanted to replace it with a simple blog. I initially planned to build a static blog using some static site generators available and host it in Cloudflare Pages. But with the introduction of D1, I changed the plan to build a dynamic site. I built it as an Open-source project and its available in -g/edge-blog. Here in this article, I will explain how I built this blog.

For storing media file like Banner Images, Images in the post and attachments in the posts I needed a storage system. I chose R2 object storage because it was easier to integrate in the Worker and cheaper.

The blog is composed of just HTML, CSS and JS files without any frameworks involved. The HTML is split into root a file and templates for different parts. There are two types of page layouts in the blog - One to display the post content and other to display the list of posts (for home page, posts in category, tag, search). Below is the wireframe of the layouts.

The routes are handled in pages function as follows in which the template html will be replaced in the root using HTMLRewriter modifiers which reads the data from the database and modifies the html content appropriately. The whole blog i rendered on the server side with data from the database. There are other modifiers which modifies the page title, meta tags as well.

The admin dashboard is built with React and Ant Components. I didn't care much about optimizing the dashboard or adding any build system, so the react and all other libraries are loaded via cdn rather than using some builder like Webpack.

You can clone and modify the above repo as pe you need. The next step is to configure a Cloudflare Page with auto deployment configured to deploy the repo. Make sure to configure the below in Build settings.

On Dec 12, 2022, the department of computer science and engineering at the University at Buffalo (SUNY), bestowed a distinguished alumni award on me. Dean Kemper Lewis handed me the award. I would have attended the ceremony in person, but I had just returned after a difficult trip to India and too much was going on at home and work. In fact, I almost missed the first email from department chair Jinhui Xu informing me about the award because I was in India.

This is better than any christmas present I could have imagined. Therefore, I thought I would take this opportunity to write down what UB and CSE mean to my life and career. It has been a while since I wrote on my personal blog and this is as good a topic as any to start.

The five years I spent in Buffalo in the early 90s were formative in many ways. I made lifelong friends I still hang out with more than 25 years since graduating in 1996. We drink beer, obsess about physical fitness and solve world hunger regularly when we meet. Many fellow UB CSE grad students were professional colleagues as well at various points in my career. Even today, when I need to discuss a difficult professional issue, some of the first folks I call are people I met in Buffalo. Of course, there are too many to all name individually, but, Ravi Bhagavan, Rajiv Chopra, Sreenivas Gollapudi, Ashish Naik, D. Sivakumar, Sridhar Seshadri, Vivek Swarnakar, Ram Narasimhan, Alok Baveja, Sriganesh Madhvanath, Ravikanth Ganesan, Srirangaraja Setlur, Kripa Sundar, Shiv Ramanna, Guruprasad Bhat, Ajay Shekhawat, Dipankar Talukdar, Vinay Dabholkar, Rama Balakrishnan, Indumathi Shankar, Geetha Srikantan, Uma Mahadevan are some of the folk who come to mind as folks I have worked with and learnt things from in no particular order. I know I have left many people out of this list and I apologize to those folks in advance. Mea culpa.

But, the joke I tell people is that Bharat not only taught me how to do world-class research in programming languages, he also taught me how to write. I still remember, the first paper we wrote together on intensional algorithmic debugging of logic programs. After seeing the first draft, Bharat asked me if I had read Elements of Style by Strunk and White, and that has been my bible for writing ever since. Of course, you may say that this blog post is shoddily written and breaks every single rule in Strunk and White. Guilty as charged.

I have tried to stay engaged with the department and the university in the time since I graduated. For example when I was in HP working on some of the earliest implementations of web services and later while setting up services research group in HP Labs, I collaborated with Prof Ramesh Ramaswamy of the management school at UB. We collaborated on workshops on the future of internet-enabled commerce in Buffalo, and globally distributed work in IIM Bangalore in the early 2000s, way before these became the norm. I hired UB grads in my first startup and ServiceNow when possible, with Shiv Ramanna being among the best product managers I have had the pleasure of working with.

It was in this context that when the current head, Jinhui Xu, sent me mail about the distinguished alumni award, I was truly humbled. It reminded me that I will always have well wishers in the CSE department at UB and I am eternally grateful for that. I am sure I will have the opportunity and reason to visit UB in the not too distant future and rekindle old relationships and establish new ones.

As I saw both the Democratic and Republican conventions happen over the last two weeks, I experienced a strange phenomenon. Whenever I turned to Fox, or whenever I heard a Trump supporter talk about how the conventions went, I felt that the Rashomon effect was in play. I could not fathom where the Trump supporters were coming from in their interpretation of events. Did they see the same things I did or were we in parallel universes?

That got me thinking who are these people, where are they coming from, what is their real grievance, what makes them support Trump and what is it that they see in Trump that seems to suggest that their grievance will be addressed by him and by nobody else. I think it is important that we understand this phenomenon and address it, or else we may have a situation that is worse than Brexit on our hands in November.

In essence, my sense is that while Trump supporters may have a pleasant nostalgic dream, disconnected from reality, what they will likely get is a nightmare even if they succeed. Because, you know, nostalgia isnt what it used to be..

When the terrorists attacked Charlie Hebdo last week, my instinctive reaction was to support Charlie Hebdo. And I still do. What has struck me since then, is the magnitude of the response of the world. My perspective has been evolving particularly when I read the following Atlantic article: -hebdo-secularism-religion-islam/384413/ because it provided me a nuanced argument I was looking for to support Charlie Hebdo even when I did not find their humor funny. Where I come from, Freedom comes with Responsibility, and one can make the argument that some of the folks in Charlie Hebdo were irresponsible in their use of freedom of speech.

The kicker though, is that according to the same data, terrorist attacks are much more likely to be performed by Islamic extremists than by any one else. So, the problem is Islamic extremism. That is the common enemy that all of us need to isolate and defeat. I would also venture to guess that the Islamic extremists are not particularly spiritual or aware of the deeper philosophical underpinnings of their religion.

My first exposure to personal computers was as an undergraduate student in the late 1980s with PCs, that had 640K RAM and a 20MB hard drive. I am not sure I had even heard of Mac those days. Through the years at grad school I predominantly worked with UNIX and variants thereof, but as soon as I joined the workforce, my personal computing device was a Windows device. Both the machine I had at work and at home tended to be windows machines as all the development I did was on windows. Apple in the late 1990s and early 2000s was not projected to be the winner in the personal computing revolution.

While I can see end consumers paying a premium for a silver/gold case with a glowing logo, I am not sure that business folks will. Yes, iPads are cool, and executives who need to see reports on the go will have them, but after experiencing the latest versions of windows and office, I think corporate end-user computing will be on Windows for some time to come.

That was the question that has been at the back of my mind through this Obamacare, government shutdown fiasco. As I write this, it appears that a NBC-WSJ poll essentially suggests that a majority of the country also thinks that the Republicans are crazy.

It all started for me when the esteemed Senator Ted Cruz from the great state of Texas spent like 20 hours rambling on a bill that was apparently introduced by himself. Essentially filibustering himself. I thought that was a bit odd, but it did have the desired effect in that I actually tried to listen to what he had to say. That is when it started to fall apart for me. All I heard was doomsday predictions about hell freezing over if Obamacare was implemented without any specifics, either in terms of why would hell freeze over, nor what can we do to prevent it other than repeal it.

The rhetoric coming out of Republicans was so extreme and seemed to suggest that Obamacare threatened the very foundation of this country. That made me wonder, why are the Republicans so scared of this?

I think the Republicans hate Obamacare because they think if it succeeds it will be the end of the Republican party and what it stands for. Only that can explain why they oppose it so viscerally and use such extreme rhetoric about its effects. Why do I say this?

So, rather than adapt to the new reality and survive by coming up with some alternatives of their own, they are behaving like an injured animal that is cornered, by being aggressive and hoping that the Democrats get scared and capitulate. It is so much easier to stop others from trying out new things than to come up with new ideas oneself.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages