Skip to content →

Category: Tech Blog

Here you can find my random notes on software design and development, software engineering, coding, and all other tech-related stuff.

Block unauthorized ssh login attempts (attacks)

My friends and I am working on a hobby project and  we need a Git server, so I set up one on my MacBook Pro. We access the repository via SSH. However when I checked the ssh log I found someone trying to get ssh access to my machine by guessing usernames. The log looks as follows:

Jun 29 21:06:52 doh1 sshd[19400]: Invalid user postgres from 190.181.132.70
Jun 29 21:06:52 doh1 sshd[19401]: input_userauth_request: invalid user postgres
Jun 29 21:06:52 doh1 sshd[19401]: Received disconnect from 190.181.132.70: 11: Bye Bye
Jun 29 21:06:54 doh1 sshd[19402]: reverse mapping checking getaddrinfo for wimax132-70.yota.com.ni [190.181.132.70] failed - POSSIBLE BREAK-IN ATTEMPT!
Jun 29 21:06:54 doh1 sshd[19403]: Received disconnect from 190.181.132.70: 11: Bye Bye
Jun 29 21:06:55 doh1 sshd[19405]: reverse mapping checking getaddrinfo for wimax132-70.yota.com.ni [190.181.132.70] failed - POSSIBLE BREAK-IN ATTEMPT!
Jun 29 21:06:55 doh1 sshd[19405]: Invalid user backup from 190.181.132.70
Jun 29 21:06:55 doh1 sshd[19406]: input_userauth_request: invalid user backup
Jun 29 21:06:56 doh1 sshd[19406]: Received disconnect from 190.181.132.70: 11: Bye Bye
Jun 29 21:06:57 doh1 sshd[19407]: reverse mapping checking getaddrinfo for wimax132-70.yota.com.ni [190.181.132.70] failed - POSSIBLE BREAK-IN ATTEMPT!

I first tried to use DenyHosts, however, there are still attempts from other IP addresses. Since there are three of us accessing the repository, I configured the hosts.allow and hosts.deny manually: deny all hosts other than the IP addresses I trust.

hosts.deny:

~$ cat /etc/hosts.deny 
sshd: ALL

hosts.allow:

~$ cat /etc/hosts.allow
sshd: [The IP addresses you allow to connect via SSH]
ALL: localhost

Now the log file should be quite…

Leave a Comment

Migrating JComments to WordPress

I switched back to WordPress from Joomla! after I registered this new domain. After migrated all the posts to WordPress using FG Joomla to WordPress, I noticed the comments have not been transferred. After some digging I didn’t find satisfactory plugin to do that, so I wrote my own PHP script to fulfill this task. The code is also available from GitHub.


13 Comments

Downgrade Preview in OS X Lion

I’ve had enough with the slow Preview application in Lion. After some digging I found this tutorial to downgrade the Preview in Lion to the Snow Leopard version. Basically you need to have a copy of both the Preview.app and /System/Library/PrivateFrameworks/MeshKit.framework from Snow Leopard. If you need to associate the default app to open pdf/png with the downgraded Preview, you have to delete the original Preview.app.

tar -pczf Preview.app.tar.gz /Applications/Preview.app
sudo rm -rf /Applications/Preview.app

Update: after installing OS X updates you need to remove the Preview.app again and put the SL Preview.app to /Applications/ directory.

Leave a Comment

C a[i] vs i[a]

When following the MIT 6.828 open course, there’s one C source code discussing pointers in Exercise 4 of lab 1.

There’s one line of code in pointers.c:

3[a] = 302;

Looks weird at first sight; but TCPL says in Chapter 5.3:

In evaluating a[i], C converts it to *(a+i) immediately; the two forms are equivalent.

So: a[i] and i[a] are equvalent (if i is a constant). 🙂

Leave a Comment

i386-jos-elf toolchain on OS X Lion

Yesterday friend and I decided to follow the MIT Operating System Engineering course together in order to get a deep understanding of OS’s. And today I started setting up the cross compling environment for the labs. At first I wanted to get the toolchain from macports, but unluckily it didn’t successfully build binutils on my Mac. As a result, I started building the toolchain from the source code, following the instructions at http://pdos.csail.mit.edu/6.828/2011/tools.html.

The programs you need for the toolchain include binutils, gcc, and gdb. For compiling gcc you also need GMP, MPFR, and MPC. The source codes are available at:

wget http://ftpmirror.gnu.org/binutils/binutils-2.21.1.tar.bz2
wget ftp://ftp.gmplib.org/pub/gmp-5.0.4/gmp-5.0.4.tar.bz2
wget http://www.mpfr.org/mpfr-current/mpfr-3.1.0.tar.bz2
wget http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz
wget http://ftpmirror.gnu.org/gcc/gcc-4.5.1/gcc-core-4.5.1.tar.bz2
wget http://ftpmirror.gnu.org/gdb/gdb-6.8a.tar.gz

Unzip them in a directory and build binutils, gcc, and gdb one by one.

$ tar jxvf binutils-2.21.1.tar.bz2
$ cd binutils-2.21.1
$ ./configure --target=i386-jos-elf --disable-nls && make && sudo make install

In order to build gcc, GMP, MPFR and MPC needs to be built first.

$ mkdir -p libs/install
$ mv gmp-5.0.4.tar.bz2 mpfr-3.1.0.tar.bz2 mpc-0.8.2.tar.gz libs/
$ tar jxvf gmp-5.0.4.tar.bz2
$ mkdir gmp-build; cd gmp-build
$ ../gmp-5.0.4/configure --prefix=$(cd ../install && pwd)
$ make && sudo make install
$ cd ..
$ tar jxvf mpfr-3.1.0.tar.bz2
$ mkdir mpfr-build; cd mpfr-build
$ ../mpfr-3.1.0/configure --prefix=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/ --with-gmp=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/
$ make && sudo make install
$ cd ..
$ tar zxvf mpc-0.8.2.tar.gz
$ mkdir mpc-build; cd mpc-build
$ ./configure --prefix=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/ --with-gmp=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/ --with-mpfr=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/
$ make ; sudo make install
$ cd ..
$ tar jxvf gcc-core-4.5.1.tar.bz2
$ mkdir gcc-build; cd gcc-build
$ ../gcc-4.5.1/configure --target=i386-jos-elf --disable-nls --without-headers --with-newlib --disable-threads --disable-shared --disable-libmudflap --disable-libssp --with-gmp=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/ --with-mpfr=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/ --with-mpc=/Users/daoyuanli/Downloads/i386-elf-gcc/libs/install/
$ make ; sudo make install

Note that it’s essential to build gcc in a directory different from the source code directory to avoid compiling errors.

Then make gdb:

$ tar zxvf gdb-6.8a.tar.gz
$ mkdir gdb-build; cd gdb-build
$ ../gdb-6.8/./configure --target=i386-jos-elf --program-prefix=i386-jos-elf- --disable-werror
$ make && sudo make install

QEMU is available in macports:

$ sudo port install qemu
15 Comments

Port already in use issue of Arduino for Eclipse plugin

When uploading with avrdude the plugin give a error prompt saying “Port already in use” (while no other application is using the port). After clicking OK it actually uploads the program to Arduino board.

port_in_use

After reading issue #6 I check the librxtxSerial.jnilib in eclipse:

.cp$ file librxtxSerial.jnilib
librxtxSerial.jnilib: Mach-O universal binary with 4 architectures
librxtxSerial.jnilib (for architecture x86_64): Mach-O 64-bit bundle x86_64
librxtxSerial.jnilib (for architecture i386): Mach-O bundle i386
librxtxSerial.jnilib (for architecture ppc7400): Mach-O bundle ppc
librxtxSerial.jnilib (for architecture ppc64): Mach-O 64-bit bundle ppc64

While in my Arduino application the librxtxSerial.jnilib output is:

llibrxtxSerial.jnilib: Mach-O universal binary with 2 architectures
librxtxSerial.jnilib (for architecture i386): Mach-O bundle i386
librxtxSerial.jnilib (for architecture ppc): Mach-O bundle ppc

So I just copied the Arduino.app//Contents/Resources/Java/librxtxSerial.jnilib file to eclipse/configuration/org.eclipse.osgi/bundles/419/1/.cp/librxtxSerial.jnilib It works after restarting eclipse. No error prompts are shown.

Leave a Comment

iCal crashes with iCal Reply Checker uninstalled

My iCal crashes everytime when someone sends me an invitation and I try either to accapt or decline it. After some investigation I found out it is the problem with “iCal Reply Checker” at http://www.nhoj.co.uk/icalreplychecker

After unstalled this app, it resets the Mail.scpt file to an empty file. To solve the problem: get another copy of Mail.scpt from another Mac, preferably from the same OS X version; and put it inside the folder: /Applications/iCal.app/Contents/Resources/Scripts

Lesson learnt: take care when trying amature software.

9 Comments

Bug in Waspmote API v0.15

I found a bug in Waspmote API v0.15 when I was trying to set XBee link keys. The API failed to set the key as specified in the code. The bug lies in function gen_data()” in lines 4355-4403. Details below. However, it was corrected in v0.18.

/*
 Function: Generates the API frame to send to the XBee module
 Parameters:
 	data : The string that contains part ofthe API frame
 	param : The param to set
 Returns: Nothing
 Values: Stores in 'command' variable the API frame to send to the XBee module
*/
void WaspXBeeCore::gen_data(const char* data, uint8_t* param)
{
	uint8_t inc=0;
	uint8_t inc2=0;
		
	clearCommand();
	it=0;
	while(data[it] != '\0') {
		inc++;
		it++;
	}
	inc/=2;
	
	while(inc211) 
	{
		for(it=0;it<8;it++)
		{
			command[inc-9+it]=param[it];
		}
	}
	else if(inc==11)
	{
		for(it=0;it<3;it++)
		{
			command[inc-4+it]=param[it];
		}
	}
	else if(inc==10)
	{
		for(it=0;it<2;it++)
		{
			command[inc-3+it]=param[it];
		}
	}
	else command[inc-2]=param[0];
}

The function in v0.18 is as follows:

/*
 Function: Generates the API frame to send to the XBee module
 Parameters:
 	data : The string that contains part of the API frame
 	param : The param to set
 Returns: Nothing
 Values: Stores in 'command' variable the API frame to send to the XBee module
*/
void WaspXBeeCore::gen_data(const char* data, uint8_t* param)
{
    uint8_t    inc=0;
    uint8_t inc2=0;
		
    clearCommand();
    it=0;
    while(data[it] != '\0') {
        inc++;
        it++;
    }
    inc/=2;
	
    while(inc2

Leave a Comment

Generating UML diagram from Java source code

Sometimes we may need to generate UML diagrams from source codes. Here’s what I do for Java code: graphviz + ant + UMLGraph. Details below:

1. Install graphviz and ant, download UMLGraph from http://www.umlgraph.org/

2. Place UMLGraph.jar in your project, for example, under
lib/

3. Write or modify your ant script, for example:


   
   The specification for the Java-based umlgraph build processes.

 
   
   
   
   
   
   
   
 
   
       
       
       
       
       
       
  
 
   
       
           
               
               
                   
               
          
           
       
   
 
   
       
           
               
               
                
               
               
               
               
               
               
               
          
       
  
 

4. Run this ant script.

ant javadocs

5. You will get the UML class diagram as expected in the generated Java docs. Here’s one example (click to enlarge):

com.andryy.hccdroid

Leave a Comment

码农

最近看系统编程准备面试,顺便找点儿小算法练练手。在面试书上看到写冒泡排序的面试题,心血来潮也来练练手。闭着眼睛敲完代码,编译竟然没有错误,运行了一下结果也竟然是对的。

于是重新打开代码,怀着无比复杂的心情来审视自己的代码,郁闷的是看不懂自己5秒钟之前写的代码。我一边很囧的看着书上给出的代码,一边对着自己的代码检查。迷迷糊糊五分钟过去之后还是看不出来自己的代码是不是冒泡排序……

无奈之下拿出笔在草稿上画图一步一步推,终于验证了自己代码的正确性……30秒写完代码,300+秒来读自己写了什么,确实够囧的,
不知道是大一的时候代码背的太熟了的缘故……

估计以后当了码农会经常出现这种状况吧:噼里啪啦的一顿敲代码,敲完之后对着显示器一顿发愣,TMD刚才都敲了些啥?就像真正的农民种田一样,种久了之后做事情完全不过脑,偶尔思考一下的时候就会感慨:我靠,我这块地为啥要撒这么多种子,用这么多化肥啊。第二天睡觉前恍然大悟:就应该放这么多才对!之前折腾个什么劲儿阿!

Leave a Comment

Qt画图

Qt提供了一个QPainter来画图,可以用来绘制矢量图,也可以用来装载图片。今天实现的是一个给照片加边框的功能,为了练习,将PicFrame构造成一个继承自QWidget的自定义Widget。这时QPainter不能直接在自己定义的Widget中使用,而需要在paintEvent(QPaintEvent *event)中实现,否则会有类似于“QPainter::begin: Paint
device returned engine == 0, type: 1”的错误消息出现。

void PicFrame::paintEvent(QPaintEvent *event)
{
    QPainter painter(this);
    QRect rect(0, 0, image.width()*(1+frameSize), image.height()*(1+frameSize));
    painter.fillRect(rect,color);
    QPoint point(frameSize*image.width()/2, frameSize*image.height()/2);
    painter.drawImage(point, image);
}

=============================心情分割线=============================

今天NordSec2010开始,又见到了很多老朋友。再聚首总是有很多要交流的,大家都在为毕设发愁,都在为前途迷茫。从来没有像现在这样反感学术,当初不去美国的决定似乎是对的。

Leave a Comment

千里之行

用Qt写计算器,花了我一个晚上终于写出来一个能用的了,能赶上大二学Java时写计算器的速度了。

用Qt Designer设计界面比较方便,用熟之后效率会更高。把界面设计好之后可以通过继承的方式给自己的类添加逻辑。如果设计的界面保存为mycaculator.ui的话,uic将会自动将这个XML文件转换成ui_mycaculator.h,其中的namespace为Ui。

#include"ui_mycaculator.h"
class Caculator : public QMainWindow, public Ui::MyCaculator

另外,Qt对字符串的处理简直跟Java一样了:

QString s1 = expStr.split(QRegExp("[+-*/]"))[0]; 
QString s2 = expStr.split(QRegExp("[+-*/]"))[1];
double d1 = s1.toDouble();
double d2 =s2.toDouble();
resStr = QVariant(d1+d2).toString();
expStr.append(resStr);

总算是迈出了第一步,再接再厉。

更新:上面的正则表达式不对,因为’+’, ‘-‘和’*’在正则表达式中有特殊意义。应该为如下:

QString s1 = expStr.split(QRegExp("[\\+\\-\\*/]"))[0];
QString s2 =expStr.split(QRegExp("[\\+\\-\\*/]"))[1];
double d1 = s1.toDouble();
double d2 = s2.toDouble();
resStr = QVariant(d1+d2).toString();
expStr.append(resStr);
Leave a Comment

Qt学习:简介和信号与槽机制

以前以为Qt比较麻烦,今天看了一下,发现它其实不比Java难。

首先Qt有非常详细的文档。这个对于开发者来说是十分重要的,纵览现在的流行开发平台,不管是Java,还是微软的平台,都有为开发人员提供详实的文档和指南。如果没有文档支持,开发过程会相当痛苦。这一点我深有体会,前段时间用libpcap写点儿小程序,这个库的所有文档就是一页man page,我甚至不知道某个函数的参数到底是什么类型。

其次,Qt的跨平台性能不输Java。Qt现在支持大多数桌面平台,Windows,Linux和Unix,Mac,手机平台上面的应用也已经成熟。开发者不用更改一行代码,就可以使自己的应用程序运行在每一个操作系统中。

还有,Qt被Nokia收购之后推出了配套的IDE,Qt Creator。这个IDE强大且美观,包含方便的图形界面设计工具,图形化调试工具,手机界面模拟器以及多样化的版本控制工具支持。

总体来说,Qt的易用性是不错的,易于上手,易于开发;但是至于性能,包括速度和安全性,我目前还没有一个清晰地认识。但我相信Nokia里面的那帮人会不断想方设法的提升Qt性能的,毕竟Nokia现在手里的王牌也只有这个了。

Qt之中提供了方便的消息传递机制:信号和槽机制(Signals and Slots),这也是Qt的核心机制,用于对象之间的通信。他的格式如下:

connect(Object1, SIGNAL(signal), Object2, SLOT(slot));

当Object1的信号被触发时,Object2的相应槽就会给以相应。当然,上面只是信号与槽的一种连接方式,其他方式还可能是:
一个信号与另外一个信号相连,即一个信号触发另外一个信号:

connect(Object1, SIGNAL(signal1), Object2,
SIGNAL(signal2));

一个信号与多个槽相连:

connect(Object1, SIGNAL(signal), Object2, SLOT(slot1));
connect(Object1, SIGNAL(signal), Object3, SLOT(slot2));

同样的,一个槽也可以响应多个信号:

connect(Object1, SIGNAL(signal1), Object2, SLOT(slot));
connect(Object3, SIGNAL(signal3), Object2, SLOT(slot));

简单的例子:

#include
#include

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QPushButton b("Quit");
    b.show();
    QObject::connect(&b, SIGNAL(clicked()), &app, SLOT(quit()));
    return app.exec();
}
Leave a Comment

UML Review

Input and output of different stages in software development:

StageInputsOutputs
Requirement AnalysisStackeholders, goals, existing bussiness processesBusiness models, use case models, prototypes
Systems
Analysis
 Business models, use case models, prototypes Use case definitions, object model, prototypes
Design Use case definitions, object model, prototypes Object model, data model, component model, architectural view, interface specifications
Implementation Object model, data model, component model, architectural view, interface
specifications
Source code, complied code, database, interfaces, deployment plan
Testing Business models, use case models, use case definitionsFault report, acceptance

Activity diagrams are used to describe flows in a variety of situations, they are flow diagrams and can be used in business modelling, requirements modelling, systems analysis and design.

Use case diagrams are used to show the presentation of functionality of a system and its interaction with the outside world. The diagrams show the boundaries of software systems but do not specify functionalities. They can be used in business modelling and requirements modelling.

Class diagrams show the static structure of a system, with classes and relationships between classes. They are used in business modelling, requirements modelling, systems analysis and design.

Statechart diagrams are used for modelling the internal state changes of and object and are a variant of activity diagrams with largely the same notation. They are used in business modelling, requirements modelling, systems analysis and design.

Sequence diagrams provide a time-ordered mapping of steps in the execution of a scenario into interactions between objects. They are one of the primary tools ofr elaborating use cases in analysis and design. They are used in systems analysis and design.

Collaboration diagrams provide a mapping of steps in the execution of a scenario into interactions between objects, drawn in two dimension in a similar way to class diagrams. They are used for similar purposes to sequence diagrams, but present the information in a different way.

Component diagrams show the implementation structure of the application and are used by the designer to indicate where the objects are implemented and how the components interact.

Reference: Ken Lunn, Software Development with UML, Palgrave Macmillan, New York, 2003, pp362-376

Leave a Comment

项目总结

从8月份小学期开始到现在,已经过去了近四个月,我们的项目也随着时间的慢慢流逝,一点一点的从不成熟的想法变成了有那么一点意思的产品(虽然幼稚了一点,但是基本功能大部分还是实现了,对比一下需求分析,我们做得还是挺不错的!),下面是我们项目实现的大致日程:

8.15~9.27:

做基本的知识准备,听课(似乎也没有认真听),做需求分析,其中第一版在9月2号讨论得出,后来又经过修修补补,于9月4日最终定稿;

9.28~10.31:

继续储备知识,复习Java程序设计,复习数据库原理,了解Oracle的基本操作,画E-R图,设计数据库结构框架;

11.1~11.4:

验证表结构,建立数据库,建立表空间,表,约束,视图;

11.5~11.30:

实际编码,写文档,模块测试;

12.1~

整体测试,优化系统,写帮助文档;

截至现在(12.2),我们的C/S模块的客户端代码已经达到了22,000+ 行(当然,其中不乏质量低劣的代码,整个系统的集成度也还不够,我想这是两个导致代码量大的原因,另外一个重要原因是:我们选定的题目不够好,后面我将会提到),C/S模块主要由周滔,王靖,李道远三人完成,其中:

周滔主要负责乘车卡管理,安全事故管理模块,以及系统的美工,代码量 1,500+;

王靖主要负责人事管理,部门管理,业绩考核模块,以及数据库的建立和日常维护,代码量8,500+;

李道远主要负责车辆管理,线路站点管理,客户反馈模块,以及管理员登录界面,主界面,系统集成和数据库权限管理,代码量12,000+;

我们的B/S模块部分主要由林栋完成:

林栋主要负责客户查询线路、站点信息,查询乘车卡消费记录、余额,提交建议、投诉。

上面提到,我们选定的题目不够好,作为小组组长,我应该首先做自我检讨:

一方面,做公交公司运营管理系统是我提出来的,其实她可以算是一个企业级别的管理应用程序,但我不自量力,觉得我们可以把这个系统做好,实际上虽然实现了基本功能,但离真正的企业级应用还有很大距离。在没有动手之前,我们认为,“只要完成了需求分析里的功能,就可以拿出去卖了”,结果现在呢?我们确实完成了需求分析里的功能,但“就算给自己用,自己都不放心”。所谓“蚍蜉撼大树,可笑不自量”,也许说得就是我吧!

另一方面,我在最开始时并不十分了解这个系统究竟应该实现什么功能,只是简单的在网上找了一些介绍性的资料,而且我没有控制好需求分析,我们并没有到实地进行考察,而是通过自己的主观想象臆造出来的,有很多细节当时并没有想清楚,只是一味的好高骛远,以为功能是越多越好。

当然,做这个项目毕竟不是我们的最终目的,我们现在也根本没有能力和精力来做好这个项目,但是我觉得我们的确从中学到了很多东西,拿我自己为例:

第一,我知道了写代码并不是一件简单的事情。虽然以前也在学校ACM网站上做过一些题目,但真正应用到实际中,却又是另外一回事,ACM要求的更多的是算法与数据结构方面的知识,而实际应用中考虑的更多的是整体架构以及模块之间的契合,至于细节,我想考虑的最多的应该是异常处理吧,虽然我们的系统并没有过多的涉及;不仅是异常处理,整天坐在电脑前面敲代码也并不是一件很愉快的事情,项目做到一半的时候我的颈椎就开始疼,现在还在疼呢!难道这就是我们以后要过的生活?唉,这也太让人沮丧了吧!

第二,软件工程太重要了。我们的需求分析做得不够好,直接导致后来的实现上的诸多困难,也许现在我们还没有“软件工程里句句话都是血”这样刻骨铭心的经历,但是,这个项目的确给我敲响了警钟。以前看周爱民的《大道至简》,觉得他说的太玄了,做完项目后我又大致浏览了前面几节,似乎现在有那么一点“共鸣”的感觉了,呵呵,不知道到时候学习软件工程能不能深入理解。

第三,做一个管理者好难。前几天和另外一个组的组长聊天,他说:“没办法,我们不能扣他们的工资!”可能说得极端了一点,但有时候我也感到非常无奈,经常在组员面前觉得无所适从,究竟怎样才能让组员做事、做实事,怎样才能调动组员的积极性一直困扰着我。有一个网友在我们的Blog上留下了这样的话:“软件中价值的创造不仅取决于开发人员所知道的和所做的,也取决于他们之间的关系以及他们共同完成的事情。沟通、简单、反馈、勇气、尊重。”在完成这个项目的过程中,虽然没有出现什么大的问题,但我们之间的默契肯定没有达到,不是每个组员都是把这个项目当成自己的任务来完成的,不是每个组员都为这个项目贡献了自己的全部力量(或者很大部分力量)。一个优秀的团队需要相互信任,但我并没有充分信任组员,这是我的错误。我曾一度感到心力交瘁,也许真的,做任何事情都不简单,想要做好则更甚。

第四,做什么事情都不能及于求成。在没有正式开始写代码之前,一个组员估计一个星期之内就可以完成自己的模块,然而实际上他写了三个多星期,中间的过程似乎也是异常痛苦的。正因为我们都急于求成,所以需求分析没做好,看来做什么事情,脚踏实地,一步一个脚印才是正道。

第五,关于解决问题之道。曾经在网上看到一篇关于如何成为一个黑客的文章,文章建议拿到一个东西应该首先对它有一个大致的了解,然后遇到问题时可以高效的解决它。现在觉得,知识不是最重要的,重要的是思维、是能力,这也许是现在我们所缺少的。我一直在尝试培养自己的解决问题的能力,发现这种方法确实是挺高效的。以前从来没有接触过NetBeans,装上后先看看它的FAQ和帮助文档是相当必要的,所谓“磨刀不误砍柴功”,正是这个意思。

第六,独立自主与协同作战。以前还看过一篇文章,其中提到:绝大多数(或者全部)的黑客都是自学成才的,而且他们对待问题的态度都是自己一定可以解决掉问题,他们遇到问题时并不急于去问别人,而是自己认真分析,自己找资料,依靠自己的能力来解决问题。也许黑客有其自身的特殊性,但我认为独立自主解决问题无疑是提高自己的最快、最好的途径。至于协同作战,其重要性主要体现在大的项目中,但协同作战并不意味着抛弃独立自主。就像在大的战役中,士兵间的相互配合是很重要的,但如果抛弃了每个士兵的自主性不谈,恐怕相互配合是很难做到的。我想说的是,相互配合最终是要落实到每个个体上的,协同说到底还是体现到了个体的能力与素质之上。

第七,关于经验。以前看见什么招聘公告上都注明“有某某经验者优先”,开始觉得没什么,现在才稍微有一点感触。有很多东西是平时在课本上所学不到的,而要靠平时积累。自己慢慢在实践中摸索出来的东西才是最重要的。

第八,专业素质。听一个老师说保送研究生面试时不一定看你得了什么奖,老师们会跟你谈话,很容易就可以知道你是什么水平,也许这就是专业素质吧。我自己觉得通过做这个项目学到了很多,知识和能力方面都有所进步。至于专业素质,不是一朝一夕可以提高的,还有待进一步努力提高。

唉,越说越多,越扯越远,就此打住,总之,这样的实践机会并不多,感谢学院,康老师为我们提供这样一次难得的机会,也希望大家以后能珍惜这样的机会,珍惜短暂的大学生活,珍惜青春!

 

Leave a Comment