About phper

First of all, I have written php few times.

Yesterday, i was looking up about phpers who are often disrespected by other language users. Then i came to one conclusion.

If you can or are going to write correct code, all is all right.

I think problems occurs from not the language(php), but persons who uses it. But php is one of softwares, so it may not be perfect as well as others.

And if php is very easy to learn and you copy and paste some codes, and then some projects are done, i can say php is very portable language. It is marvelous. But If you don’t want to be a trouble maker, you should learn it hard.

Many people are getting security matters on the table. but all we can do is to be a little more careful. Hackers are going to attack us whatever the causes.

So now, I won’t disrespect people because they are phper.

(of course, it is my personal and optimistic perspective.)

substring #golang

I didn’t think up how to take substring from string data, so I looked up how to do it.

I found the solution in go-nuts group(very helpful resource).


func substr(s string,pos,length int) string{
l := pos+length
if l > len(bytes) {
l = len(bytes)
return string(bytes[pos:l])

the original source use not byte but int. but it didn’t work.
so I modified int into byte. It seems to be working well.

I uses it as utility function.