Role transition to a Frontend Developer

modern residential building facade decorated with green plants

There are only two hard problems in Computer Science: cache invalidation and naming things.

Phil Karlton

I recently started a frontend role at Automattic. Just in case any of you still don’t know the company, it’s the company behind WordPress.com, Tumblr, Simplenote etc.

Developers at A8C are all kinda full stack engineers. I was mostly a backend dev in my previous careers, but as fate would have it, I ended up in a front team. A big change I would say. I mean I have done a lot of frontend stuff before, but never served as a frontend developer, meaning I know how things work, but I don’t know how to make it perfect. So I decide to start blogging again, making notes while learning and develop all the skills required.

Found a interesting diagram about the tech stack of a frontend dev nowadays.

Credits: Frontend Master

I’ll explore the nodes on the diagram bits by bits and concentrate mostly on CSS and Reactjs where I’m not 100% confident.

Jumpline免费空间取消方法

不知道当时怎么鬼迷了心窍,申请了需要填信用卡信息的Jumpline三个月免费的空间。速度一般,续费超贵,一个月要$15刀,还是季付。关键是最近Jumpline更改了政策,只有在下一次账单生成之后才能取消服务,很恶心,万一忘记就死定了。我在Google日历里加了备忘,以防忘记。可是就在今天晚上,收到了通知新账单的Email,哈哈,取消服务的日子终于来了。
取消方法:
用你的账号密码从https://my.jumpline.com登录,点击“My Products”,再点击“View Details”,再如下图操作(图 via hostloc,可能略有不同): Continue reading “Jumpline免费空间取消方法”

PHP Speedy : 加多少Cache你也快不过我!

php_speedy_logo_medium前些日子曾经写过一篇博文《加速WordPress》,完全用手工来调整,加速我们的WordPress,html代码层次加速WordPress是其中最为有效的手段。即使你的全静态页面,如果一个网页中加载过多js, css的话,也会慢得要命。
下面有朋友留言问,是不是有插件可以自动进行这些优化,我当时没有发现有类似插件。今天终于被我找到了,没错,就是PHP Speedy ! 装了YSlow的同学可以先测下我博客的所有页面,绝对全都是A,如果你发现有不是A的,告诉哥,哥赏糖吃你,吼吼!
Continue reading “PHP Speedy : 加多少Cache你也快不过我!”

在GAE上用二级域名托管Feed

前面介绍过怎样不被Feed托管商绑死,在Feedburner和FeedSky之间来回换而不损失订户的方法。由于Feedburner不支持二级域名绑定,我用一个虚拟机来给feed域名做302重定向到托管在Feedburner的地址,但是这个主机在国外,教育网上不方便。于是想把feed子域名停放在GAE上,再做302重定向。

上传程序和绑定域名的方法不赘述,参考下面三篇文章即可:

大蜘蛛:Google App Engine (GAE)注册与部署

徐明:Google App Engine 入门:上传应用程序

无名氏:Google企业应用套件最新最全申请攻略

需要注意的是,申请Google Apps的时候直接绑定你的根域即可,不要绑定二级域名,因为现在Google Apps已经不支持绑定裸域了,即使本来就是二级域名。举例:绑定kangzj.net,而不要绑定feed.kangzj.net 。

打包下载

下面附上代码:

Continue reading “在GAE上用二级域名托管Feed”

基于Google自定义搜索的“Google师大”

google-bnu

演示:http://g.xinqing100.net (教育网) http://kangzj.net  (右上角的搜索框)

“我爱水煮鱼”介绍过怎样把“Google自定义搜索整合到WordPress”,我已经做了,大家可以搜索下试试,就在右上角的搜索框里搜索。确实比原先的站内搜索要好用(原来的搜索只是搜索日志,而不包括留言及其它页面),并且不占用服务器资源,建议大家都整下,呵呵。这里我再给大家介绍下我用Google自定义搜索做的“Google师大”,专门搜索北师大的网站,大家有兴趣的话,看完之后也可以给自己的学校或者单位做个这样的搜索啊:

Continue reading “基于Google自定义搜索的“Google师大””

Preminder Beta后台程序源码

Preminder Beta后台程序源码,用PHP-CLI写的(什么是PHP-CLI?)加了些注释,大家可以看一下。最有意思就是HashURL时的$SEED,其实获取PR是不符合Google的服务条款的,很汗的吧……
写好脚本之后,在/etc/crontab里加入一条每小时执行的计划,就可以啦,在这里可以看到PR检测日志

27 *    * * *   root    /usr/bin/php -f /home/kangzj/kang.php

Continue reading “Preminder Beta后台程序源码”