swirl学习之三——Sequences of Numbers


| Please choose a course, or type 0 to exit swirl.

1: R Programming
2: Take me to the swirl course repository!

Selection: 1

| Please choose a lesson, or type 0 to return to course menu.

1: Basic Building Blocks 2: Workspace and Files
3: Sequences of Numbers 4: Vectors
5: Missing Values 6: Subsetting Vectors
7: Matrices and Data Frames 8: Logic
9: Functions 10: lapply and sapply
11: vapply and tapply 12: Looking at Data
13: Simulation 14: Dates and Times
15: Base Graphics

Selection: 3

| | 0%

| In this lesson, you'll learn how to create sequences of numbers
| in R.

...

|=== | 5%

| The simplest way to create a sequence of numbers in R is by
| using the `:` operator. Type 1:20 to see how it works.

> 1:20
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

| Perseverance, that's the answer.

|===== | 9%

| That gave us every integer between (and including) 1 and 20. We
| could also use it to create a sequence of real numbers. For
| example, try pi:10.

> pi:10
[1] 3.141593 4.141593 5.141593 6.141593 7.141593 8.141593 9.141593

| Perseverance, that's the answer.

|======== | 14%

| The result is a vector of real numbers starting with pi
| (3.142...) and increasing in increments of 1. The upper limit
| of 10 is never reached, since the next number in our sequence
| would be greater than 10.

...

|========== | 18%

| What happens if we do 15:1? Give it a try to find out.

> 15:1
[1] 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

| Excellent job!

|============= | 23%

| It counted backwards in increments of 1! It's unlikely we'd
| want this behavior, but nonetheless it's good to know how it
| could happen.

...

|=============== | 27%

| Remember that if you have questions about a particular R
| function, you can access its documentation with a question mark
| followed by the function name: ?function_name_here. However, in
| the case of an operator like the colon used above, you must
| enclose the symbol in backticks like this: ?`:`. (NOTE: The
| backtick (`) key is generally located in the top left corner of
| a keyboard, above the Tab key. If you don't have a backtick
| key, you can use regular quotes.)

...

|================== | 32%

| Pull up the documentation for `:` now.

> ?`:`

| That's a job well done!

|==================== | 36%

| Often, we'll desire more control over a sequence we're creating
| than what the `:` operator gives us. The seq() function serves
| this purpose.

...

|======================= | 41%

| The most basic use of seq() does exactly the same thing as the
| `:` operator. Try seq(1, 20) to see this.

> seq(1,20)
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

| That's correct!

|========================= | 45%

| This gives us the same output as 1:20. However, let's say that
| instead we want a vector of numbers ranging from 0 to 10,
| incremented by 0.5. seq(0, 10, by=0.5) does just that. Try it
| out.

> seq(0,10,by=0.5)
[1] 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
[13] 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0

| You are doing so well!

|============================ | 50%

| Or maybe we don't care what the increment is and we just want a
| sequence of 30 numbers between 5 and 10. seq(5, 10, length=30)
| does the trick. Give it a shot now and store the result in a
| new variable called my_seq.

> my_seq<-seq(5,10,length=30)

| You are quite good my friend!

|=============================== | 55%

| To confirm that my_seq has length 30, we can use the length()
| function. Try it now.

> length(my_seq)
[1] 30

| Perseverance, that's the answer.

|================================= | 59%

| Let's pretend we don't know the length of my_seq, but we want
| to generate a sequence of integers from 1 to N, where N
| represents the length of the my_seq vector. In other words, we
| want a new vector (1, 2, 3, ...) that is the same length as
| my_seq.

...

|==================================== | 64%

| There are several ways we could do this. One possibility is to
| combine the `:` operator and the length() function like this:
| 1:length(my_seq). Give that a try.

> 1:length(my_seq)
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[21] 21 22 23 24 25 26 27 28 29 30

| You got it!

|====================================== | 68%

| Another option is to use seq(along.with = my_seq). Give that a
| try.

> seq(along.with=my_seq)
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[21] 21 22 23 24 25 26 27 28 29 30

| Keep working like that and you'll get there!

|========================================= | 73%

| However, as is the case with many common tasks, R has a
| separate built-in function for this purpose called seq_along().
| Type seq_along(my_seq) to see it in action.

> seq_along(my_seq)
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[21] 21 22 23 24 25 26 27 28 29 30

| You are doing so well!

|=========================================== | 77%

| There are often several approaches to solving the same problem,
| particularly in R. Simple approaches that involve less typing
| are generally best. It's also important for your code to be
| readable, so that you and others can figure out what's going on
| without too much hassle.

...

|============================================== | 82%

| If R has a built-in function for a particular task, it's likely
| that function is highly optimized for that purpose and is your
| best option. As you become a more advanced R programmer, you'll
| design your own functions to perform tasks when there are no
| better options. We'll explore writing your own functions in
| future lessons.

...

|================================================ | 86%

| One more function related to creating sequences of numbers is
| rep(), which stands for 'replicate'. Let's look at a few uses.

...

|=================================================== | 91%

| If we're interested in creating a vector that contains 40
| zeros, we can use rep(0, times = 40). Try it out.

> rep(0,times=40)
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[32] 0 0 0 0 0 0 0 0 0

| Keep up the great work!

|===================================================== | 95%

| If instead we want our vector to contain 10 repetitions of the
| vector (0, 1, 2), we can do rep(c(0, 1, 2), times = 10). Go
| ahead.

> rep(c(0,1,2),times=10)
[1] 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2

| Excellent job!

|========================================================| 100%

| Finally, let's say that rather than repeating the vector (0, 1,
| 2) over and over again, we want our vector to contain 10 zeros,
| then 10 ones, then 10 twos. We can do this with the `each`
| argument. Try rep(c(0, 1, 2), each = 10).

> rep(c(0,1,2),each=10)
[1] 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2

| Keep working like that and you'll get there!

| Are you currently enrolled in the Coursera course associated
| with this lesson?

1: Yes
2: No

Selection: 2

| You've reached the end of this lesson! Returning to the main
| menu...

swirl学习之二——Workspace and Files


| Please choose a course, or type 0 to exit swirl.

1: R Programming
2: Take me to the swirl course repository!

Selection: 1

| Please choose a lesson, or type 0 to return to course menu.

1: Basic Building Blocks 2: Workspace and Files 3: Sequences of Numbers
4: Vectors 5: Missing Values 6: Subsetting Vectors
7: Matrices and Data Frames 8: Logic 9: Functions
10: lapply and sapply 11: vapply and tapply 12: Looking at Data
13: Simulation 14: Dates and Times 15: Base Graphics


Selection: 2

| | 0%

| In this lesson, you'll learn how to examine your local workspace in R and begin to explore
| the relationship between your workspace and the file system of your machine.

...

|== | 2%

| Because different operating systems have different conventions with regards to things like
| file paths, the outputs of these commands may vary across machines.

...

|==== | 5%

| However it's important to note that R provides a common API (a common set of commands) for
| interacting with files, that way your code will work across different kinds of computers.

...

|====== | 7%

| Let's jump right in so you can get a feel for how these special functions work!

...

|======== | 10%

| Determine which directory your R session is using as its current working directory using
| getwd().

> getwd()
[1] "/Users/xiaomodepro/DataAnalysis"

| Keep up the great work!

|========== | 12%

| List all the objects in your local workspace using ls().

> ls()
character(0)

| You are quite good my friend!

|============= | 15%

| Some R commands are the same as their equivalents commands on Linux or on a Mac. Both
| Linux and Mac operating systems are based on an operating system called Unix. It's always
| a good idea to learn more about Unix!

...

|=============== | 17%

| Assign 9 to x using x <- 9.

> x<-9

| You are really on a roll!

|================= | 20%

| Now take a look at objects that are in your workspace using ls().

> ls()
[1] "x"

| Keep working like that and you'll get there!

|=================== | 22%

| List all the files in your working directory using list.files() or dir().

> list.files()
[1] "Anscombe.R" "case_Anscombe.R"

| Nice work!

|===================== | 24%

| As we go through this lesson, you should be examining the help page for each new function.
| Check out the help page for list.files with the command ?list.files.

> ?list.files

| Keep working like that and you'll get there!

|======================= | 27%

| One of the most helpful parts of any R help file is the See Also section. Read that
| section for list.files. Some of these functions may be used in later portions of this
| lesson.

...

|========================= | 29%

| Using the args() function on a function name is also a handy way to see what arguments a
| function can take.

...

|=========================== | 32%

| Use the args() function to determine the arguments to list.files().

> args(list.files)
function (path = ".", pattern = NULL, all.files = FALSE, full.names = FALSE,
recursive = FALSE, ignore.case = FALSE, include.dirs = FALSE,
no.. = FALSE)
NULL

| You got it right!

|============================= | 34%

| Assign the value of the current working directory to a variable called "old.dir".

> old.dir<-getwd()

| You're the best!

|=============================== | 37%

| We will use old.dir at the end of this lesson to move back to the place that we started. A
| lot of query functions like getwd() have the useful property that they return the answer
| to the question as a result of the function.

...

|================================== | 39%

| Use dir.create() to create a directory in the current working directory called "testdir".

> dir.create("testdir")

| Excellent job!

|==================================== | 41%

| We will do all our work in this new directory and then delete it after we are done. This
| is the R analog to "Take only pictures, leave only footprints."

...

|====================================== | 44%

| Set your working directory to "testdir" with the setwd() command.

> setwd("testdir")

| Excellent job!

|======================================== | 46%

| In general, you will want your working directory to be someplace sensible, perhaps created
| for the specific project that you are working on. In fact, organizing your work in R
| packages using RStudio is an excellent option. Check out RStudio at
| http://www.rstudio.com/

...

|========================================== | 49%

| Create a file in your working directory called "mytest.R" using the file.create()
| function.

> file.create("mytest.R")
[1] TRUE

| You got it!

|============================================ | 51%

| This should be the only file in this newly created directory. Let's check this by listing
| all the files in the current directory.

> list.files()
[1] "mytest.R"

| Nice work!

|============================================== | 54%

| Check to see if "mytest.R" exists in the working directory using the file.exists()
| function.

> file.exists("mytest.R")
[1] TRUE

| All that hard work is paying off!

|================================================ | 56%

| These sorts of functions are excessive for interactive use. But, if you are running a
| program that loops through a series of files and does some processing on each one, you
| will want to check to see that each exists before you try to process it.

...

|================================================== | 59%

| Access information about the file "mytest.R" by using file.info().

> file.info("mytest.R")
size isdir mode mtime ctime atime uid gid
mytest.R 0 FALSE 644 2015-05-08 00:36:33 2015-05-08 00:36:33 2015-05-08 00:36:33 501 20
uname grname
mytest.R xmuxiaomo staff

| That's the answer I was looking for.

|==================================================== | 61%

| You can use the $ operator --- e.g., file.info("mytest.R")$mode --- to grab specific
| items.

...

|======================================================= | 63%

| Change the name of the file "mytest.R" to "mytest2.R" by using file.rename().

> file.rename("mytest.R","mytest2.R")
[1] TRUE

| You got it right!

|========================================================= | 66%

| Your operating system will provide simpler tools for these sorts of tasks, but having the
| ability to manipulate files programatically is useful. You might now try to delete
| mytest.R using file.remove('mytest.R'), but that won't work since mytest.R no longer
| exists. You have already renamed it.

...

|=========================================================== | 68%

| Make a copy of "mytest2.R" called "mytest3.R" using file.copy().

> file.copy("mytest2.R","mytest3.R")
[1] TRUE

| That's the answer I was looking for.

|============================================================= | 71%

| You now have two files in the current directory. That may not seem very interesting. But
| what if you were working with dozens, or millions, of individual files? In that case,
| being able to programatically act on many files would be absolutely necessary. Don't
| forget that you can, temporarily, leave the lesson by typing play() and then return by
| typing nxt().

...

|=============================================================== | 73%

| Provide the relative path to the file "mytest3.R" by using file.path().

> file.path("mytest3.R")
[1] "mytest3.R"

| Perseverance, that's the answer.

|================================================================= | 76%

| You can use file.path to construct file and directory paths that are independent of the
| operating system your R code is running on. Pass 'folder1' and 'folder2' as arguments to
| file.path to make a platform-independent pathname.

> file.path("folder1","folder2")
[1] "folder1/folder2"

| All that practice is paying off!

|=================================================================== | 78%

| Take a look at the documentation for dir.create by entering ?dir.create . Notice the
| 'recursive' argument. In order to create nested directories, 'recursive' must be set to
| TRUE.

> ?dir.create

| You are amazing!

|===================================================================== | 80%

| Create a directory in the current working directory called "testdir2" and a subdirectory
| for it called "testdir3", all in one command by using dir.create() and file.path().

> dir.create(file.path("testdir2","testdir3"),recursive=TRUE)

| Excellent job!

|======================================================================= | 83%

| To delete a directory you need to use the recursive = TRUE argument with the function
| unlink(). If you don't use recursive = TRUE, R is concerned that you're unaware that
| you're deleting a directory and all of its contents. R reasons that, if you don't specify
| that recursive equals TRUE, you don't know that something is in the directory you're
| trying to delete. R tries to prevent you from making a mistake.

...

|========================================================================= | 85%

| Delete the "testdir2" directory that you created by using unlink().

> unlink("testdir2",recursive=TRUE)

| You got it!

|============================================================================ | 88%

| Why is this command named "unlink" rather than something more sensible like "dir.delete"
| or "dir.remove"? Mainly, history. unlink is the traditional Unix command for removing
| directories.

...

|============================================================================== | 90%

| Go back to your original working directory using setwd(). (Recall that we created the
| variable old.dir with the full path for the orginal working directory at the start of
| these questions.)

> setwd(old.dir)

| Keep up the great work!

|================================================================================ | 93%

| It is often helpful to save the settings that you had before you began an analysis and
| then go back to them at the end. This trick is often used within functions; you save, say,
| the par() settings that you started with, mess around a bunch, and then set them back to
| the original values at the end. This isn't the same as what we have done here, but it
| seems similar enough to mention.

...

|================================================================================== | 95%

| Delete the 'testdir' directory that you just left (and everything in it)

> unlink("testdir",recursive=TRUE)

| That's a job well done!

|==================================================================================== | 98%

| Take nothing but results. Leave nothing but assumptions. That sounds like 'Take nothing
| but pictures. Leave nothing but footprints.' But it makes no sense! Surely our readers can
| come up with a better motto . . .

...

|======================================================================================| 100%

| In this lesson, you learned how to examine your R workspace and work with the file system
| of your machine from within R. Thanks for playing!

...

| Are you currently enrolled in the Coursera course associated with this lesson?

1: Yes
2: No

Selection: 2

| You've reached the end of this lesson! Returning to the main menu...

swirl学习之一——Basic Building Blocks


| Please choose a course, or type 0 to exit swirl.

1: R Programming
2: Take me to the swirl course repository!

Selection: 1

| Please choose a lesson, or type 0 to return to course menu.

1: Basic Building Blocks 2: Workspace and Files
3: Sequences of Numbers 4: Vectors
5: Missing Values 6: Subsetting Vectors
7: Matrices and Data Frames 8: Logic
9: Functions 10: lapply and sapply
11: vapply and tapply 12: Looking at Data
13: Simulation 14: Dates and Times
15: Base Graphics

Selection: 1

| | 0%

| In this lesson, we will explore some basic building blocks of
| the R programming language.

...

|== | 3%

| If at any point you'd like more information on a particular
| topic related to R, you can type help.start() at the prompt,
| which will open a menu of resources (either within RStudio or
| your default web browser, depending on your setup).
| Alternatively, a simple web search often yields the answer
| you're looking for.

...

|=== | 5%

| In its simplest form, R can be used as an interactive
| calculator. Type 5 + 7 and press Enter.

> 5+7
[1] 12

| You are doing so well!

|===== | 8%

| R simply prints the result of 12 by default. However, R is a
| programming language and often the reason we use a programming
| language as opposed to a calculator is to automate some process
| or avoid unnecessary repetition.

...

|====== | 11%

| In this case, we may want to use our result from above in a
| second calculation. Instead of retyping 5 + 7 every time we
| need it, we can just create a new variable that stores the
| result.

...

|======== | 14%

| The way you assign a value to a variable in R is by using the
| assignment operator, which is just a 'less than' symbol
| followed by a 'minus' sign. It looks like this: <-

...

|========= | 16%

| Think of the assignment operator as an arrow. You are assigning
| the value on the right side of the arrow to the variable name
| on the left side of the arrow.

...

|=========== | 19%

| To assign the result of 5 + 7 to a new variable called x, you
| type x <- 5 + 7. This can be read as 'x gets 5 plus 7'. Give it
| a try now.

> x<-5+7

| That's correct!

|============ | 22%

| You'll notice that R did not print the result of 12 this time.
| When you use the assignment operator, R assumes that you don't
| want to see the result immediately, but rather that you intend
| to use the result for something else later on.

...

|============== | 24%

| To view the contents of the variable x, just type x and press
| Enter. Try it now.

> x
[1] 12

| That's correct!

|=============== | 27%

| Now, store the result of x - 3 in a new variable called y.

> y<-x-3

| Your dedication is inspiring!

|================= | 30%

| What is the value of y? Type y to find out.

> y
[1] 9

| All that practice is paying off!

|================== | 32%

| Now, let's create a small collection of numbers called a
| vector. Any object that contains data is called a data
| structure and numeric vectors are the simplest type of data
| structure in R. In fact, even a single number is considered a
| vector of length one.

...

|==================== | 35%

| The easiest way to create a vector is with the c() function,
| which stands for 'concatenate' or 'combine'. To create a vector
| containing the numbers 1.1, 9, and 3.14, type c(1.1, 9, 3.14).
| Try it now and store the result in a variable called z.

> z<-c(1.1,9,3.14)

| Excellent job!

|===================== | 38%

| Anytime you have questions about a particular function, you can
| access R's built-in help files via the `?` command. For
| example, if you want more information on the c() function, type
| ?c without the parentheses that normally follow a function
| name. Give it a try.

> ?c

| You are amazing!

|======================= | 41%

| Type z to view its contents. Notice that there are no commas
| separating the values in the output.

> z
[1] 1.10 9.00 3.14

| All that hard work is paying off!

|======================== | 43%

| You can combine vectors to make a new vector. Create a new
| vector that contains z, 555, then z again in that order. Don't
| assign this vector to a new variable, so that we can just see
| the result immediately.

> c(z,555,z)
[1] 1.10 9.00 3.14 555.00 1.10 9.00 3.14

| You got it!

|========================== | 46%

| Numeric vectors can be used in arithmetic expressions. Type the
| following to see what happens: z * 2 + 100.

> z*2+100
[1] 102.20 118.00 106.28

| Nice work!

|=========================== | 49%

| First, R multiplied each of the three elements in z by 2. Then
| it added 100 to each element to get the result you see above.

...

|============================= | 51%

| Other common arithmetic operators are `+`, `-`, `/`, and `^`
| (where x^2 means 'x squared'). To take the square root, use the
| sqrt() function and to take the absolute value, use the abs()
| function.

...

|============================== | 54%

| Take the square root of z - 1 and assign it to a new variable
| called my_sqrt.

> my_sqrt<-sqrt(z-1)

| You are quite good my friend!

|================================ | 57%

| Before we view the contents of the my_sqrt variable, what do
| you think it contains?

1: a vector of length 3
2: a single number (i.e a vector of length 1)
3: a vector of length 0 (i.e. an empty vector)

Selection: 1

| Keep up the great work!

|================================= | 59%

| Print the contents of my_sqrt.

> my_sqrt
[1] 0.3162278 2.8284271 1.4628739

| You are quite good my friend!

|=================================== | 62%

| As you may have guessed, R first subtracted 1 from each element
| of z, then took the square root of each element. This leaves
| you with a vector of the same length as the original vector z.

...

|==================================== | 65%

| Now, create a new variable called my_div that gets the value of
| z divided by my_sqrt.

> my_div<-z/my_sqrt

| Perseverance, that's the answer.

|====================================== | 68%

| Which statement do you think is true?

1: my_div is undefined
2: The first element of my_div is equal to the first element of z divided by the first element of my_sqrt, and so on...
3: my_div is a single number (i.e a vector of length 1)

Selection: 2

| You got it right!

|======================================= | 70%

| Go ahead and print the contents of my_div.

> my_div
[1] 3.478505 3.181981 2.146460

| Your dedication is inspiring!

|========================================= | 73%

| When given two vectors of the same length, R simply performs
| the specified arithmetic operation (`+`, `-`, `*`, etc.)
| element-by-element. If the vectors are of different lengths, R
| 'recycles' the shorter vector until it is the same length as
| the longer vector.

...

|========================================== | 76%

| When we did z * 2 + 100 in our earlier example, z was a vector
| of length 3, but technically 2 and 100 are each vectors of
| length 1.

...

|============================================ | 78%

| Behind the scenes, R is 'recycling' the 2 to make a vector of
| 2s and the 100 to make a vector of 100s. In other words, when
| you ask R to compute z * 2 + 100, what it really computes is
| this: z * c(2, 2, 2) + c(100, 100, 100).

...

|============================================= | 81%

| To see another example of how this vector 'recycling' works,
| try adding c(1, 2, 3, 4) and c(0, 10). Don't worry about saving
| the result in a new variable.

> c(1,2,3,4)+c(0,10)
[1] 1 12 3 14

| Great job!

|=============================================== | 84%

| If the length of the shorter vector does not divide evenly into
| the length of the longer vector, R will still apply the
| 'recycling' method, but will throw a warning to let you know
| something fishy might be going on.

...

|================================================ | 86%

| Try c(1, 2, 3, 4) + c(0, 10, 100) for an example.

> c(1,2,3,4)+c(0,10,100)
[1] 1 12 103 4
Warning message:
In c(1, 2, 3, 4) + c(0, 10, 100) :
longer object length is not a multiple of shorter object length

| Nice work!

|================================================== | 89%

| Before concluding this lesson, I'd like to show you a couple of
| time-saving tricks.

...

|=================================================== | 92%

| Earlier in the lesson, you computed z * 2 + 100. Let's pretend
| that you made a mistake and that you meant to add 1000 instead
| of 100. You could either re-type the expression, or...

...

|===================================================== | 95%

| In many programming environments, the up arrow will cycle
| through previous commands. Try hitting the up arrow on your
| keyboard until you get to this command (z * 2 + 100), then
| change 100 to 1000 and hit Enter. If the up arrow doesn't work
| for you, just type the corrected command.

> z*2+1000
[1] 1002.20 1018.00 1006.28

| All that practice is paying off!

|====================================================== | 97%

| Finally, let's pretend you'd like to view the contents of a
| variable that you created earlier, but you can't seem to
| remember if you named it my_div or myDiv. You could try both
| and see what works, or...

...

|========================================================| 100%

| You can type the first two letters of the variable name, then
| hit the Tab key (possibly more than once). Most programming
| environments will provide a list of variables that you've
| created that begin with 'my'. This is called auto-completion
| and can be quite handy when you have many variables in your
| workspace. Give it a try. (If auto-completion doesn't work for
| you, just type my_div and press Enter.)

> my_div
[1] 3.478505 3.181981 2.146460

| You are quite good my friend!

| Are you currently enrolled in the Coursera course associated
| with this lesson?

1: Yes
2: No

Selection: 2

| You've reached the end of this lesson! Returning to the main
| menu...

《这一生,至少当一次傻瓜》读书笔记

五一在家读完了这本书,收获了许许多多的感动,也明白了每个人都有不为人知的艰苦奋斗历程。推荐大家阅读这本书,我把书中对我自己感触深的地方摘抄下来。

(一)

“我告诉他当个傻瓜就好,做做看就会知道,没有比当傻瓜更简单的事了。既然想死,那就在死之前当一次傻瓜。身为有过相同念头的过来人,我领悟到了一点:为一件事疯狂,总有一天可以从中找到答案。”

木村这句话道尽了他的人生。


(二)

想要不使用农药栽培苹果,简直就是痴人说梦。

任何苹果果农都会这么认为。

问题是,木村为什么会疯狂地迷上这个痴人之梦?

阅读全文 »

倒退的旅行

(一)

我靠在座位上,仰头盯着车厢顶上淡黄色平行的两行灯,眼角的余光在不经意间,感受到两侧车窗外的一切物体都在向前迅速掠过。一切的岩石、树木、楼房、花草、电线塔,无一例外,都迅速向前、向前,消失不见。也许是前方有个黑洞,把这一切的物体都统统吞噬了吧。


(二)

周围的窗户黑了下来,一道道光影划过,仿佛置身时光列车中,穿梭于跨越时空的隧道。

我一直在后退,快速地后退,沿着时光的脚印倒退,退回到我身后那片记忆中充满欢笑与爱的土地——故乡。

阅读全文 »

用心聆听你们的声音

今天上午,连续四节的《软件体系结构》实验课,从早上八点开始,一直持续到将近中午十二点,我担任这门课的助教。

实验的内容关于设计模式,题目有六道,在上个星期四布置,要求同学们在本周四(今天)前完成,并在实验课上由助教逐一检查。

由于我自己平时在这门课的理论课上也没有仔细听讲,多是去了把签到表发下去,然后就径自坐在教室后排看自己带的书,所以只好临时突击。昨天晚上和今天一早把六个设计模式看了一遍,并把题目和详解也看了一遍,当然,这么短的时间看下来,只是知其然而已。

阅读全文 »

摘抄小诗一首

别让我祈祷能在险恶中获得庇护,

而祈祷可以勇敢地面对险恶;


别让我乞求痛苦止息,

而乞求我的心可以战胜痛苦;


别让我在人生战场上盼望盟友,

而是发现自己的力量。

阅读全文 »

顶澳仔小广场卖豆花的老爷爷

下午六点多去顶澳仔小广场,接即将跳舞结束的梦梦。

傍晚的小广场,往来的行人络绎不绝。在灯火辉煌的街边小店和众人之中,我看到了一个坐在石墩上的老爷爷,他的背微微弓起,面前是一辆三轮车,拖斗里放着一桶做好的豆花,车上立着一个大牌子,写着“客家豆花”。

我看到有人来买豆花,老爷爷起身,背弓得很厉害,深深弯着腰,用纸杯打着豆花,加了点糖,盖好盖子,递给客人,那样子真是礼貌极了。

阅读全文 »

没有任何借口

我这个人有个坏毛病,有时候对待家人和女朋友,明明是没有关心和照顾到,却说着许许多多正当的理由。

生活和学习中的很多时候,我如果没做好一件事情,心里常会反思着一定是自己不够认真或者没有尽心尽力,而不会找其他的借口。和同学一起做某件事,当看到摊上麻烦事时大家相互推脱、把自己置身事外的样子时,我心里总会一声叹息,然后想着怎么把事情往好的方向调整,下一步要怎么做才是关键,互相推卸责任、把自己与事情撇清关系是不可取的,是没有责任心和缺乏担当的表现。

阅读全文 »

厦大院长推荐书目

阅读全文 »