Unless there is a compelling reason for using an init() function, it is really a waste of time and bad coding practice. However, there are instances where it is needed, or is much simpler to use an init() function. I do real-time, embedded programming and most of the classes have init() functions. The reason is that memory is statically allocated and fixed and initializing classes via constructors does not guarantee what order the classes are initialized in. Therefore, if a class depends on another class being set up already, for example (there are other reasons as well), the init() functions can be called after all the necessary set up is done. This guarantees that it is known precisely when the classes start running.
CBJG
Posts
-
another preference question.... -
IP/Email TracingHopefully someone out there has a little more expertise than I do in how email/IP addresses work. First off, I know you can supposedly trace email headers to find the original sender of an email (if the IPs haven't been spoofed). But what happens when the last IP address in the header (which should be the source) resolves to something like user@gmail.com? Is there anyway that the source IP can be found in that case? In particular with gmail, I've read that the source IP can't be tracked--is this true? Next of all, if an ISP assigns dynamic IPs to customers (which most of them do), does anyone know how precise the data is that they keep? E.g., is it possible to go back in time and find out which particular IP address was assigned to a customer on a certain date? I know spammers have been tracked down and arrested, but is this the result of law enforcement doing active tracking once they have a suspect? The reason I ask all this is I have an disgruntled ex-landlord who claims I mail-bombed her and signed her up for a bunch of unsolicited offers. Now, it is possible she could've entered my apartment when I lived there and done stuff on my computer to make it "look" like I did something. Research I've done, though, doesn't even seem like if I did do this, that it was unlawful. From my research of illegal emails, I found that for it to be illegal, it has to have a commercial purpose and not have an opt-out mechanism, or have spoofed email headers, none of which would've been true if I'd just sent her a bunch of emails. Any thoughts on this? She claims she has "evidence of felony fraud" as well, but I also thought fraud would involve attempted financial gain; I don't see how even what she claims happened involved that. Any and all comments are appreciated! CM