Personal opinion: The article idea is very good, the author's coding style is also great, can learn a lot of things. Reprinted article is I have seen attentively, and hope that the follow-up can be back to look at the article, and strive to make their ability more and more strong, refueling
Hacking news here? The author used the code to update his resume, is not very grounded gas, special in line with the programmer's force lattice. This is a readable executable of the C language source files, but also the embodiment of the author's coding style.
#include <stdio.h>#include<time.h>typedefstruct{Union {Char*Company ; Char*School; Char*project; }; Union {Char*Location ; Char*URL; }; Union {Char*title; Char*Program ; }; time_t started; time_t left; Char*description[];} Thing_t;typedef thing_t job_t;typedef thing_t school_t;typedef thing_t project_t;#defineCurrent 0/* I wasn ' t alive at the Unix epoch and so ' ll work */* Contact information */char * name = "Kevin R. Lange" ;Char* email ="[email protected]";Char* Address ="1045 Mission St, Apt 440\n" "San Francisco, CA 94103";/*Education*/school_t UIUC={. School="University of Illinois at Urbana-champaign",. location="Urbana, IL",. Program="BS Computer Science",. Started=1251158400,. Left=1336608000,. Description= { "Minor in International Studies in Engineering, Japan", "Focused on systems software courses", NULL}}; school_t Hit={. School="Hiroshima Institute of Technology",. location="Hiroshima, Japan",. Program="Study Abroad",. Started=1274745600,. Left=1278288000,. Description= { "Cultural Exchange Program", NULL}}; school_t* schools[] = { &UIUC,&Hit , NULL};/*Projects*/project_t Compiz={. Project="Compiz Window Manager",. URL="http://compiz.org",. Title="Developer",. Started=1201392000,. Left=1264291200,. Description= { "Minor Plugin Contributor", "Various Projects", NULL}}; project_t Toaruos={. Project="Toaruos",. URL="Https://github.com/klange/toaruos",. Title=" Lead",. Started=1295049600,. Left=Current ,. Description= { "Hobby x86 unix-like kernel and userspace", "Advanced in-house GUI with compositing window manager", NULL}}; project_t* projects[] = { &Toaruos,&Compiz, NULL};/*Employment History*/job_t Yelp={. Company="Yelp, Inc.",. location="San Francisco, CA",. Title="software Engineer, i18n",. Started=1339977600,. Left=Current ,. Description= { "developed several internal tools and libraries", "provided critical input and design work for Yelp's launch in Japan", NULL}}; job_t apple_internship={. Company="Apple Inc.",. location="Cupertino, CA",. Title="Software Engineering Intern",. Started=1306886400,. Left=1314662400,. Description= { "Built software framework for testing and verification of desktop Retina display modes", "assisted other interns with Unix fundamentals", NULL}}; job_t* jobs[] = { &Yelp,&apple_internship, NULL};voidPrint_thing (thing_t *thing) { Charstarted[ -]; Charleft[ -]; structTM *ti; inti =0; printf ("%s at%s-%s\n", Thing->title, Thing->company, thing->Location ); TI= LocalTime (&thing->started); Strftime (started, -,"%B%d,%Y", TI); if(Thing->left = =Current ) {printf ("%s to now\n", started); } Else{ti= LocalTime (&thing->Left ); Strftime (left, -,"%B%d,%Y", TI); printf ("%s to%s\n", started, left); } Char* * desc = thing->description; while(*desc) {printf ("-%s\n", *desc); Desc++; }}intMain (intargcChar**argv) {printf ("%s\n%s\n%s\n\n", name, email, address); Puts ("education\n"); school_t* * s =schools; while(*s) {print_thing (*s); Puts (""); S++; } puts ("employment\n"); job_t* * j =jobs; while(*j) {print_thing (*j); Puts (""); J++; } puts ("projects\n"); project_t* * p =projects; while(*p) {print_thing (*p); Puts (""); P++; } return 0;}
After compiling, we see a resume as follows
Kevin R. Lange
[Email protected]
1045 Mission St, Apt 440
San Francisco, CA 94103
Education
BS Computer Science at University of Illinois at Urbana-champaign–urbana, IL
August, 10, 2012
-Minor in International Studies in Engineering, Japan
-Focused on Systems software courses
Study abroad at Hiroshima Institute of Technology–hiroshima, Japan
May, July 05, 2010
-Cultural exchange Program
Employment
Software Engineer, i18n at Yelp, Inc.–san Francisco, CA
June, now
-Developed several internal tools and libraries
-Provided critical input and design work for Yelp's launch in Japan
Software Engineering Intern at Apple Inc.–cupertino, CA
June, 30 to August, 2011
-Built software framework for testing and verification of desktop Retina display modes
-assisted other interns with Unix fundamentals
Projects
Leads at Toaruos-https://github.com/klange/toaruos
January-Now
-Hobby x86 unix-like kernel and userspace
-Advanced in-house GUI with compositing window manager
Developer at Compiz Window manager-http://compiz.org
January to January 24, 2010
-Minor Plugin Contributor
-Various Projects
Original: http://www.codeceo.com/article/c-program-notes.html
"Go" share a resume written in C language