zhenzhubay.com

珍珠湾全球网

 找回密码
 用户注册

tag 标签: 程序员

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

分享 黑客马拉松 Hackathon
热度 4 Rafting 2015-10-17 13:08
黑 客马拉松并不是指涉及犯罪的黑客活动。而是热衷钻研技术的软件工程师及其他人员,还有来自风投公司的团队聚在一起,创造出来有用的软件的一项活动。黑客马 拉松一般长达几十个小时,参赛者累了或坐或卧,现场休息。“黑客马拉松”逐渐成为应用软件开发的主要形式:一群高手云集一堂,在几十个小时内拿出作品,择 优而奖。 黑客马拉松很受到软件工程师的欢迎。现在有了更加易用的软件编写工具,加上各公司乐于让第三方分享他们的数据,结果是催生了一系列创意和新兴企业,光是围绕苹果的iOS系统,从2007年开始,就开发了一百二十五万个插件应用软件,去年为程序员们带来50亿美元收入。 黑客马拉松近年很受学计算机有关专业学生的欢迎。有些大学的学生组织会组织一年一次的大赛,大赛对全美或全世界的大学生开放,免费提供无线网、三餐、饮料,以及工作空间和必要的电器设备。鼓励参赛学生组队,但少于五人。 有名的大学黑客比赛吸引很多有名公司的赞助,吃得很好,但大多没有多少时间睡觉。参赛者都会得到赞助公司的小礼物,赢得大奖更是开心。去年加大伯克利分校的黑客年会参赛者达1500人,创造了所有黑客大赛参赛人数最多人的记录。其他有名的大学黑客马拉松包括: 麻省理工的HACKMIT, 普林斯顿的HACKPrinceton, 宾大的PennApps, 加大洛杉矶分校的LAHacks, 杜克大学的HackDuke, 德州大学奥斯汀分校的HackTX, 密歇根大学的MHacks, 普渡大学的Boilemake, 耶鲁大学的Y-Hack, 伊大香槟分校的HackIllinois, 以及曼彻斯特 城市大学的StudentHack。 加大伯克利分校上周末举办了2015年的黑客年会Cal Hacks 2.0, 参赛人数有2000多人,打破了去年的记录。儿子也参加了这次比赛。他高中上了计算机科学这门AP课后,喜欢上计算机科学。这次幸运得奖。 https://www.youtube.com/watch?v=yQIiVu4AADw
12960 次阅读|14 个评论
分享 四十分钟能做什么?程序员的汗水
热度 6 岳东晓 2013-7-29 15:04
软件开发面试C++问题 2010-11-08 14:19:27 当年每次经过计算机系走廊,到处听到的是老美响亮的“PLUS PLUS”的声音--都在讨论呢。那时遇到问题时的“圣经”是ARM (C++ Annotated Reference Manual)。过了10多年,C++已经实现了标准化,标准文件就有上千页。C++水平往往是HACKER水平高低的标志。 有次,有人把一个C++面试的问题发给我。我一看,现在面试问题越来越刁难了嘛。题目是: 有10万个文本文件,输入一个词组,如何迅速找出含这些词的文件。把题发过来后,开始计时,必须60-90分钟之内完成,将答案寄回 。 我一看,这不是要构造一个简单的搜索引擎嘛。 时间紧迫,我立刻打开VI,开始迅速TYPE,并进行了测试。然后将代码与测试的截屏在40多分钟的时候EMAIL了回去。下面将题及我的解答贴出,各位遇到类似的问题可以作为参考。 /////////////////////////////////面试问题////////////////////////////////////////////// /************* * * Copyright (C) D. Yue, March 4, 2009 * */ #include iostream #include iterator #include map #include vector #include list #include set #include algorithm #include boost/tokenizer.hpp /******************************** Problem 1 Time cut-off: 60 - 90 min. 1.Data: a set of 100,000 ASCII files (strings). 2.Each file contains 1 or more words. 3.A query is entered from stdin (may contain multiple words). 4.Code in C++: find files in (1) that partially matche to query input. 5.Assume: the function will be invoked repeatedly. 6.Optimize for time. ********************************************************************************************/ /************************** Solution to Problem 1 Algorithm datastructure *) Assign a unique integer ID to each of the N ASCII strings, so one can retrieve them by their ID, call these IDs StringIDs; *) Store the strings in some container, which allows easy retrieval by IDs, a hashtable is approriate. *) Break each string into words (tokenization) *) In a hash table with the words as keys, store the StringIDs of the strings that contain a key; *) On user input search the keys in the hashtable, once a match is found, get the StringIDs, then print the corresponding string *) take care of the requirement that multiple words must all match ******************************/ using namespace std; using namespace boost; struct StringWithID { StringWithID() {} StringWithID(int i, const string s): id(i), value(s) {}; int id; string value; static int getNextID() { return NextID++; } // used when assigning a new ID to a new string private: static int NextID; }; int StringWithID::NextID =1; //initialize class Search{ typedef mapint, struct StringWithID IdToString; // given an ID find the string typedef mapstring, int StringToId; // given a string, find its ID typedef mapstring, listint WordToIds; // given a word, find the IDs of the strings that contains the word public: //Initialize the StringSet and WordsToIDs map with the ASCII strings bool initialize( const vectorstring strs) { using namespace std; using namespace boost; for(vectorstring::const_iterator p=strs.begin(); p != strs.end(); p++ ) { if(str2id.find(*p) != str2id.end()) continue; // string already there int new_id = StringWithID::getNextID(); // assign this ID to the new guy id2str = StringWithID(new_id, *p); // stored str2id = new_id; //reverse lookup stored tokenizer tok(*p); for(tokenizer::iterator i=tok.begin(); i!=tok.end();i++){ cout"Got token " *i endl; w2id .push_back(new_id); } } return true; } //pattern is a space separated list of words //we iterate through the w2id map to check if bool find_match(const string pattern) { //first we tokenize the pattern into words liststring pats; tokenizer tok(pattern); for(tokenizer::iterator i=tok.begin(); i!=tok.end();i++){ pats.push_back(*i); } size_t pat_cnt = pats.size(); mapstring, setint matched_sets; for(liststring::iterator pi = pats.begin(); pi != pats.end(); pi++) { for(WordToIds::iterator witer = w2id.begin(); witer != w2id.end(); witer++) {//iteratate through the words string word = witer-first; if(word.find(*pi) != string::npos) { // the word matched the pattern cout"Found: " *pi " in: " wordendl; copy((witer-second).begin(), (witer-second).end(), inserter(matched_sets , matched_sets .begin())); for(setint::iterator i = matched_sets .begin(); i != matched_sets .end(); i++) { int str_id = *i; string str = id2str .value; cout"Found sub-pattern "*pi " in: "strendl; } break; } } } //at this point we have sets of IDs for the individual sub input patterns, we must find the ones that in all of the sets (intersection) setint good_ids; bool first_run = true; for(mapstring, setint ::iterator i = matched_sets.begin(); i!= matched_sets.end(); i++) { if(first_run) { good_ids = i-second; first_run = false; continue; } setint old_good_ids = good_ids; setint int_set = i-second; good_ids.clear(); set_intersection(int_set.begin(), int_set.end(), old_good_ids.begin(), old_good_ids.end(), inserter(good_ids, good_ids.begin())); } //now print out the strings if(good_ids.empty() ) { cout"No match found!"endl; }else { for(setint::iterator i = good_ids.begin(); i != good_ids.end(); i++) { int str_id = *i; string str = id2str .value; cout"Matched string: "strendl; } } return !good_ids.empty(); } protected: IdToString id2str; StringToId str2id; WordToIds w2id; }; //test program int main() { vectorstring strings; strings.push_back("angry brad pitt"); strings.push_back("pitt likes jolie"); Search search; search.initialize(strings); char buf ; while(std::cin.getline(buf, 255)) { search.find_match(buf); } }
6193 次阅读|5 个评论
分享 美国程序员自掏1/5薪水 工作外包给沈阳公司
热度 5 蓝天绿地 2013-1-17 03:51
 说到程序员,大家脑海中都会闪现出一个踏实勤奋的形象,今天为大家带来一则趣闻,讲讲世界上最清闲也是最会偷懒的程序员。一家美国重要基础设施公司在对去年工作进行安全审计时发现,该公司的一个明星程序员竟然将自己的工作外包给了中国沈阳的一家软件公司,自己则在上班的时候在网上闲逛。 BBC英文新闻原文链接http://www.bbc.co.uk/news/technology-21043693 该公司在电信供应商Verizon那里设立了一个基本VPN系统,支持双重认证,从而可以让员工在家中办公。然而,VPN登录日志却显示,该公司的主服务器经常被来自中国沈阳的用户访问,而且使用的认证账户是其程序员“Bob”。   据Verizon介绍,发现此事后,这家公司的IT人事部认为,可能是网络受到了恶意攻击,因此要求Verizon排查。然而,最终调查结果令人大跌眼镜。并非是受恶意软件感染或是黑客攻击,是程序员Bob雇佣了中国沈阳的一家软件公司帮助他完成日常工作,调查人员在他的工作站中发现了他与那家软件公司交易的数百张PDF发票。Bob的工资高达6位数,而他付给外包公司的佣金只是其工资的五分之一。 Bob每天在公司的“工作”就是在网上闲逛,9点上班后看看新闻网站和视频,11点半去吃午饭,下午1点开始“工作”去逛eBay淘东西,然后再花两三个小时登录社交网站,5点准时下班。 令人惊诧的,他的计划之前从未被识破,而且在人力资源部门眼中,Bob多个季度都是公司的明星程序员,被认为精通C、C++、Perl、Java、Ruby、PHP和Python。 进一步的调查发现,Bob其实很有事业心,他还兼职了多份工作,当然同样也是外包出去了。通过这种方法,他不但每天都能清闲地上网,还轻松赚到了大把的Money。 目前Bob已被解雇。 ----------------------- 多少年我一直在问这个问题。看了这个消息后不禁又要问:既然沈阳的程序员这么出色,为什么软件外包全去了印度呢?找几个美国经验的华人当项目经理,中国应该能接软件项目!
9839 次阅读|13 个评论

Archiver|手机版|珍珠湾全球网

GMT+8, 2024-6-1 06:07 , Processed in 0.035161 second(s), 9 queries , Apc On.

Powered by Discuz! X2.5

回顶部