Ling Zhang Ling Zhang's Blog

AI对软件行业的影响

近期在准备同济大学高等讲堂的讲座,写了一页材料关于AI对软件工业影响的预测:

  1. 大部分编程工作不再需要手工编写代码;
  2. 程序员从配电脑到配AI;
  3. 非科班出身有机会参与一些简单、业务驱动型软件的开发;
  4. 软件研发流程依然有效 – Agile, DevOps, Platform Engineering;
  5. 想象力、创造力和好奇心变得更加重要;
  6. 研发岗位边界打破,一人多岗成为可能;
  7. 前端和测试用工需求减少;
  8. 项目周期和交付成本快速降低;
  9. 核心业务系统所依赖的业务能力和关键技术能力(如基础运维)还需要人类专家;
  10. 程序员工作收入可能会降低;
  11. 计算机专业大学生在当前培养模式下获得持续能力提升的可能性在降低;
  12. 循规蹈矩的985毕业生可能面临来自脑子活络的双非毕业生的挑战。

English Translation:

Impact of AI on Software Industry

Recently, I have been preparing for a lecture at Tongji University’s Advanced Lecture Series and wrote a page of material about my thoughts on the impact of AI on the software industry in the near future:

  1. Most programming work will no longer require manually writing code;
  2. Programmers will shift from equipped with computers to equipped with AI;
  3. People without a formal computer science background will have opportunities to participate in the development of some simple, business-driven software;
  4. Software R&D processes will still be effective – Agile, DevOps, Platform Engineering;
  5. Imagination, creativity and curiosity will become more important;
  6. The boundaries of R&D roles will be broken, and it will become possible for one person to take on multiple roles;
  7. Demand for front-end development and testing engineers will decrease;
  8. Project cycles and delivery costs will decrease rapidly;
  9. The business capabilities and key technical capabilities on which core business systems depend (such as IT infra Operation) will still require human experts;
  10. Programmers’ incomes may decrease;
  11. With the current education system, the likelihood that computer science university students will achieve continuous capability improvement at campus is decreasing;
  12. Rule-following graduates from 985 universities (top universities in China) may face challenges from more quick-witted graduates from non-985/non-211 universities.

Read more

我的理想iPhone Duo

折叠后小屏运行iOS,一个标准的iPhone;展开后大屏运行MacOS,一个迷你版MacBook。

English Translation:

My Ideal iPhone Duo

The outer (smaller) screen runs iOS and the inner (larger) screen runs macOS.

Read more

Moving to Github Pages

I just finished migrating my blog website hosted on DreamHost to GitHub Pages (github.io). The old WordPress site has been deployed since July 2006 right after I migrated my blog content from a blogging host provider in China.

Moving from DreamHost to GitHub took me about half a day using Claude Code. It gave me the insights on how to complete this task and wrote all the migration code. Everything went extremely smooth, and Claude nearly made no mistakes. I spent more hours on polishing the UI and fixing some smaller user experience problems.

I no longer need to pay $191.88/year. Open Source and AI win:-)

中文翻译:

我刚刚完成了将托管在 DreamHost上的博客网站迁移到GitHub Pages(github.io)。早先的WordPress系统自2006年7月部署到DreamHost起就一直运行至今,而更我是从博客中国把早期的文章迁移到了DreamHost。

从DreamHost迁移到GitHub花了大约半天时间,全程使用Claude Code来完成所有迁移代码。整个过程非常顺畅,Claude几乎没有犯任何错误。我花了更多时间在打磨UI和修复一些小体验问题上。

我每年不再需要支付 191.88 美元了 - 感谢开源和AI。

Read more

为什么伟大不能被计划

这是2024年底在上海交通大学图书馆看的一本书,我在空白首页上看到了同学写的阅读心得,很欣喜。

why greatness cannot be planned - cover why greatness cannot be planned - reading note

English Translation:

This is a book I came across at the Shanghai Jiao Tong University Library toward the end of 2024. On the blank first page, I discovered reading notes left by a SJTU student — and what a delightful surprise it was.

Read more

FDE的中国实践

FDE(Forward Deployed Engineer)要解决的问题,是把AI能力和客户具体场景结合,构建满足客户需求的个性化解决方案。FDE角色是否能够成功,在中国取决于以下几个问题的回答:

  1. AI基础能力是否足够泛化;
  2. 标准化软件产品是否在中国有足够的市场;
  3. 企业客户是否愿意为价值买单;
  4. 以工时(人天)作为驻场咨询/交付的费用核算模式是否会继续;
  5. AI公司是否有足够的利润空间养活FDE。

English Translation:

The problem that FDEs (Forward Deployed Engineers) aim to solve is to combine AI capabilities with specific customer scenarios to build personalized solutions that meet client needs. Whether the FDE role can succeed in China depends on the answers to the following questions:

  1. Whether the foundational AI capabilities are sufficiently generalizable;
  2. Whether there is a large enough market for standardized software products in China;
  3. Whether enterprise clients are willing to pay for value;
  4. Whether the billing model based on man-days for on-site consulting and delivery will continue;
  5. Whether AI companies have sufficient profit margins to sustain FDE teams.

Read more

Housekeeping

It has been a long time since my last update on this blog site. I still pay the web hosting fee over the years but actually not contributing new content and did not spent time to manage this site.

I took some time today to do some housekeeping work on this web site and hope I could continue sharing my thoughts and opinions.

What I did for this housekeeping:

1. Update WordPress version from 4.x to 6.x;

2. Backup all WordPress blog posts, comments and uploaded files;

3. Enable SSL secure access;

4. Pick up a new and modern theme (and I like it);

5. Delete all pending spam comments.

Cheers~

Read more

Search bar in Firefox 34

The latest Firefox 34 shipped with a revised search bar design. To be honest, I don't like it because I need to change the default search engine from time to time and do not want to click my preferred search engine every time I search.

Lucky it's possible to restore the previous design by modifying the Firefox configuration - to change 'browser.search.showOneOffButtons' to false (details - http://forums.mozillazine.org/viewtopic.php?f=23&t=2890823)

Before

before

After
after

Read more

Windows 7自建虚拟无线WiFi

升级到iOS8后, Cisco LEAP协议不支持,无法连到公司内部无线网,中国移动GPRS实在太慢。找到几篇文章,使用Windows 7自带的虚拟WiFi在笔记本上自建AP,让移动设备上网,步骤简化如下:

1. 在管理员权限下运行命令行cmd;

2. 运行命令 netsh wlan set hostednetwork mode=allow ssid=<your_ap_name> key=<password>

其中<your_ap_name>是无线AP的ssid,用手机找WiFi可以发现;<password>是这个AP的连接密码;

3. 接着运行 netsh wlan start hostednetwork,这样在网络连接可以看到该虚拟WiFi连接:

virtual_wifi

4. 把一个实际网络连接的流量共享给该虚拟WiFi。方法是右键选择当前可用网络连接的‘属性’,然后在共享里分享给虚拟WiFi。

最后,如果你装了防火墙如Symantec Endpoint Protection,需要添加一条过滤规则放行移动设备对此虚拟WiFi适配器的访问。

Read more

CORS (Cross-Origin Resource Sharing) preflighted OPTIONS request

CORS提供了安全访问跨域请求的方案,目前主流的浏览器都支持CORS。其中CORS preflighted request中提到浏览器需要先发出一个OPTIONS的请求在服务器端获得通过后(利用HTTP response中的CORS header进行审批)才可以进行后续的访问。根据规范,此HTTP OPTIONS请求中不允许携带任何cookie

我很想知道这样的设计是出于什么考虑?如果是出于安全考虑,那么当前用户session如果已经登录此跨站网站并且有cookie,这些cookie对所访问的跨域服务器来说是没有个人信息泄露的问题,因为本来这些cookie就是服务器产生并返回给浏览器的,你送不送不存在安全隐患。Chrome之前有个bug就是在OPTIONS请求里面带了cookie,最近刚刚修复,而Chrome并没有质疑规范的设计是否合理。

不允许带Cookie在采用了如TAM, Siteminder等统一认证的环境下很麻烦,因为这样的request还没有机会到达应用本身就被前端reverse proxy(或web server agent)拦住了,而它们都不具备判断目标应用是否会放行此跨域请求的能力(一般情况下应用程序负责维护一个信任网站的白名单),所以还得通过配置放行此无cookie的请求到目标应用。

Read more

上手Bluemix (3)

截止上篇文章,我们已经在Bluemix上构建了一个可以连接Bluemix数据库服务、基于WebSphere Liberty Server的Java Web应用了。我们提到Connections Blogs的老版本(相比新版本对WebSphere Application Server (WAS)已经是最小的了)跑起来还是会有很多错误,大致总结一下:

1) WAS专用API. 如做Basic Authentication用的是WAS Programmatic Login的API;

2) 和WAS环境相关的配置文件。代码中需要到WAS环境下特定的目录找某些配置文件;

3) 不同Web container的实现差异。在移植过程中发现对于URL的最后一个斜杠/,在WAS和Liberty中处理是不同的;

4) 文件系统。Blogs会把上传附件保存在文件系统,目前我也不清楚Bluemix上给我的空间大小(应该是1G)和位置。通过测试说明至少服务器端代码是可以在Liberty安装目录下创建目录和文件的;

5) Directory service。这是Connections自己的code,根据用户配置调用WAS VMM API从Federated Repository,或者Connections Profiles里查找用户详细信息。这两个数据源在Bluemix上都没有,所以需要更新一些代码跳过用户同步过程。

在disable了Basic Authentication、Connections navbar、Directory service和Lucene index后,Blogs最终可以跑在Bluemix上。

最后的问题是用户登录,我没打算搞个LDAP,只要创建些简单的测试用户就可以了。在Liberty里很容易做到,通过在server.xml中添加用户定义和角色定义,如下:

定义用户:

<basicRegistry id="basic" realm="WebRealm">
      <user name="ajones1" password="jones1"/>
      <user name="ajones2" password="jones2"/>
      <user name="ajones3" password="jones3"/>
      <user name="ajones4" password="jones4"/>
      <user name="ajones5" password="jones5"/>
      <user name="ajones6" password="jones6"/>
</basicRegistry>

定义用户在应用中的role:

<application type="war" id="blogs" name="blogs" location="blogs.war">
    <application-bnd>
        
        <security-role name="person">
            <special-subject type="ALL_AUTHENTICATED_USERS" />
        </security-role>
        <security-role name="admin">
            <user name="ajones1"/>
        </security-role>
        
    </application-bnd>
</application>

"ALL_AUTHENTICATED_USERS"是个特殊的保留角色,对应于WAS的相同角色,用来指定所有已登录用户。测试中我发现security-role的映射有bug,不是每次调用request.isUserInRole(role)都会返回正确的结果。

接下来的事情很关键 - 如何把一份自定义的server.xml文件上传到server端?答案:你做不到。目前找到的解决方案是按照Bluemix的buildpack去部署应用,即同时上传Liberty的Runtime和应用程序。利用Eclipse的Bluemix插件很容易实现:

1) 下载Eclipse Bluemix插件。在Eclipse Marketplace搜索‘bluemix’,找到后安装:

bluemix-plugin-install

2) 安装后右键在Server Tab里点New Server,选择IBM Bluemix,开始配置:

config-bluemix-plugin

domain

bind-db

3) 配置完成后,可以直接用Publish选项发布整个Runtime和application。

upload

<终>

Read more