Slashdot Mirror


User: shotglasses

shotglasses's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:Here's my challenge... on Mastering Regular Expressions · · Score: 1
    If you have data where the multi-line matching isn't working, can you reformat your data in some way to get around the problem?

    I have spent much time parsing poorly written HTML pages, and find that if I read the whole file into a string, and then substitute all whilespace characters for a space, all of the multi-line problems (and many others) go away, because your data is now only one line...

    This works with HTML because the "format" of the data is imbedded in the tags, not the physical formatting, but I have used a similar approach when parsing logfiles that attempt to be "user friendly" and wrap long lines -- now each line of the file may or may not be a complete record. To get one record per line, join them all together, and split them on the "timestamp" field, and now you have a bunch of single line records to work with. If there isn't a timestamp, is there another way to determine the beginning (or end) of a record?

    Obviously, you cannot always reformat the data file, and if you cannot change the actual files, make a copy and modify the copy

    There might not be an easy way, but there should be a way -- you just have to keep working on it!

    Mark

  2. Make it fun! on What Do You Do When CS Isn't Fun Any More? · · Score: 2, Insightful
    I graduated with a CS degree and knew that I did not want to be a developer. I love to code, but I hate being a developer. As a SysAdmin I spend the majority of my time writing scripts to automate things or simplify things. Scripting is writing code with largely self imposed requirements, so you don't get into the cycle of "well that's not what I really wanted" or "we changed the requirements" -- all the fun of programming without the hassle of being a developer!

    Many advanced CS courses are trying to teach you a concept, and most profs give you leeway in how to implement that concept. Just because everybody else is writing the code in C does not mean you have to use C -- pick a different language, maybe one you've never used before. The assignment may be mind numbingly boring in a language that you already know, but it becomes an interesting challenge in a new language -- and you personally get something out of the class that nobody else did.

    I used this approach and it definitely changed the way I felt about school.

    If you can't make school fun, build something fun on your own.

    • Is there something cool that you have heard about but never tried?
    • Is there some library/function/module that you have used, that is just a "black box" (give it input, magic happens, and something different comes out) Have you ever wondered how the magic happens? Try implementing it yourself!
    • Do you have your own website? If not, build one, if you dohave one, make it better! (it helps if you are passionate about whatever the subject is). HTML is boring -- Learn how to make things interactive with CGI or Flash
    • Have you set up a Linux server or an Apache server or an Oracle server? Try it!
    If you pick the topic, you are your own boss -- you can go as deeply into one topic as you want, or quickly move on to something else. This gives you a chance to try different things to help you narrow down your career choices. But try to pick topics that will help you in the "real world" -- You can spend days generating an alien landscape with a ray-tracing program, but will that help you get a job that you will like?

    (witty sig needed)