Jan 12, 2014 05:42 AM
(This post was last modified: Jan 12, 2014 05:48 AM by shebang.)
(Jan 11, 2014 04:21 PM)Tedd Wrote: It's a loop because it shows the speed if you were using the function hundreds of times, do you understand logic?
Why would you use the framework's function, if it's slower than the function you use?? Riddle me that.
Why would you be running it that many times for it to make enough of a difference? You need to combine a path once in 99% of the situations it's going to be applied in.
I use the same practices you do, but he makes a good point. Also, one more thing: You don't exactly need to use Console.Out.Writeline(), since it's the same as Console.WriteLine(). This is what the latter looks like:
Code Public Shared Sub WriteLine(value As String)
Out.WriteLine(value)
End Sub
Out.WriteLine should be used when you need to apply a TextWriter (i.e. piping other application's output).
Jan 12, 2014 01:51 PM
(This post was last modified: Jan 12, 2014 01:52 PM by Washi.)
(Jan 11, 2014 04:21 PM)Tedd Wrote: It's a loop because it shows the speed if you were using the function hundreds of times, do you understand logic?
Why would you use the framework's function, if it's slower than the function you use?? Riddle me that.
I believe there are some platform issues when you use the string concatenation instead of the Path.Combine method. I can recall having some issues with combining paths on Japanese systems (or maybe another language) which used for example other directory separators. Therefore, you are always save if you use the Combine method.
(Jan 12, 2014 01:51 PM)Washi Wrote: I believe there are some platform issues when you use the string concatenation instead of the Path.Combine method. I can recall having some issues with combining paths on Japanese systems (or maybe another language) which used for example other directory separators. Therefore, you are always save if you use the Combine method.
See, THAT is good reasoning. With ident saying that "you should just because you should" because "I am a programmer and you are not," he is not explaining why something should be done a certain way, he is just being a dick.
Thanks for the source. Seems very handy!
DO NOT DEAL WITH THIS MEMBER
I know a lot of people look for this code & it's one of the things I'm asked about a lot.... I'm gonna send them to your code :) Great share :)
(Jan 12, 2014 01:51 PM)Washi Wrote: I believe there are some platform issues when you use the string concatenation instead of the Path.Combine method. I can recall having some issues with combining paths on Japanese systems (or maybe another language) which used for example other directory separators. Therefore, you are always save if you use the Combine method.
(Jan 12, 2014 10:57 PM)ᒪeumonic Wrote: See, THAT is good reasoning. With ident saying that "you should just because you should" because "I am a programmer and you are not," he is not explaining why something should be done a certain way, he is just being a dick.
Exactly. TUP, I get your point and that really makes sense. I respect that, and it makes sense when you explain it that way. I'm just sick of ident coming in to threads and saying "you suck you're a horrible programmer why would you use Ijk() instead of Abc.Edf() you cunt!?".. This is why people respect you, and not him.
(Jan 13, 2014 12:38 AM)Oscura Wrote: Thanks for the source. Seems very handy!
Thank you!
(Jan 13, 2014 07:29 AM)nuk Wrote: I know a lot of people look for this code & it's one of the things I'm asked about a lot.... I'm gonna send them to your code :) Great share :)
Thanks man! That's why I like sharing :)
C# conversion for you...
Figured it'd help. :P
http://pastebin.com/WzW3zT3J
(Jan 13, 2014 06:35 PM)ᒪeumonic Wrote: C# conversion for you...
Figured it'd help. :P
http://pastebin.com/WzW3zT3J
Thank you, added to the original post!!
|