Log in

Computer Science
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in Computer Science's LiveJournal:

[ << Previous 20 ]
Saturday, March 13th, 2010
12:42 pm
Looking for a job. java team lead / system architect

At the moment I am looking for a job of java team lead / system architect.
LinkedIN profile

Tuesday, February 17th, 2009
4:17 pm
I can't help but hate Emacs.  Part of that is from actual experience, and part of it is a contrarian inability to accept as sane the myriad postings lauding the benefits of a dedication to Emacs that one can find with as much Google-fu as my 2-year-old niece.  It's the same reason I refused to watch Titanic, and the reason I refuse to read the last two books in the Harry Potter series.

I spend somewhere between 97 and 99 percent of my programming time in Visual Studio.  Hey, I write C# almost exclusively here.  What do you expect?  I tend to use Scite for any tiny editing that needs doing, like config files, or whatever.

I'm willing to admit that Visual Studio bites a big one.  Almost all software does.  It's fairly limited in flexibility, compared to other editors.  But my dirty little secret is that I don't need it to be flexible.  I use it to write, build, and debug C# code, and for those purposes, I don't know that I could ask for anything better.  Part of that is the amount of time I've got behind it, but part of it is that it's pretty clear about the functionality it offers, and anything else you need is going to have to come from somewhere else.  In other words, it does well the things it was designed to do, and is phenomenally bad at anything else.

The biggest thing that I see people laud about Emacs is the ability to extend the editor.  Okay, that's cool in theory.  If there's some reason why you can't do a thing, or can't do it without more work than you'd like to do, you can splice in the functionality you want without going through all of the agony that an editor like Visual Studio would require.  I'm totally down with that concept.

I've tried Emacs in the past, and I've always been frustrated by its apparent inability to act sanely.  I started teaching myself Python recently, and I decided last week that I was going to grit my teeth and only use Emacs for writing Python.  I wasn't going to let myself break down and go back to use IDLE, Scite, or nano.  I decided this after about two weeks of looking for a decent Python IDE that didn't leave me with the impression that it was half-built.

One of the major philosophical problems that I have with Emacs is that the ability to rewrite or extend every part of the editor makes brain surgery out of the process of modifying any part of the editor.  It's like the difference between buying a couple of computer components and plugging them together, and being handed a fabrication plant, schematics, and a vast quantity of hazardous materials and told, "You can make this computer do anything you want!"  The ability to change anything makes the entire interface unpredictable, and The Interface Is The Machine.  I've heard Emacs described as "transparent", and I would point out that completely transparent objects cannot be seen.

A perfect example is python-mode, which I found and got running without slitting my wrists (despite having to find some inexplicable sequence of elisp to make Emacs actually use python-mode).  I got it running, then started editing a file and noticed a few of the nice things it was doing for me, such as auto-indenting and keeping track of the current block in the minibuffer.  Then I go to run my little pygame test app, and all seems to be fine.  I close the pygame window, and a blank buffer immediately cuts my screen in half.  Interfaces are a big deal to me, and trying to figure out what was happening (because it's useful in scenarios other than mine) and how I could fix it (I still haven't worked that out) has taken up most of my afternoon.  I tried going hunting through python-mode.el, but I'm not familiar enough with the way Emacs does anything to be able to tell if the file is a major mode for editing Python or the poorly-punctuated diaries of Ted Bundy.

Steve Yegge is a very clearly in favor of Emacs, to say the least.  He has more than one post extolling the virtues of Emacs, and providing tips on streamlining the normal Emacs workflow.  One of the first tips he gives is to remap the M-x sequence, which is used about as often in the course of an Emacs editing session as the hand-washing stations at a colo-rectal clinic.  In other words, it's one of the most important keystrokes in the entire program, and the first words out of his mouth are to rebind it.  If the binding is so bad, why isn't it bound to something more friendly to begin with?  Because there are people who have been using Emacs for decades that are completely habituated?  Isn't the point of software to get better at doing something?  Keeping a detrimental keybinding for the sake of backwards compatible muscle memory is analogous to a car manufacturer only making manual transmissions because older drivers can't drive without using both feet.

A lot of people love Emacs.  I get it.  I've heard the same reasons over and over.  But hearing that someone has spent ten years getting Emacs customized to his liking makes me think that
  1. This person is insane.
  2. This person is a control freak on a level not encountered by psychological medicine.
  3. Customizing Emacs is akin to finding a warm place to sleep by tunneling down to the Earth's core.
I don't want to spend years learning my editor.  Shit, I don't want to spend months learning my editor, especially if I'm only trying to reach a point at which I'm not afraid to touch the keyboard for fear that I'll miss a key-stroke and inadvertently shut down the Internation Space Station.  I'm not demanding that Emacs conform exactly to the interface standards of Windows, MacOS, or whatever.  That would be futile and asinine.  I'm asking for an editor that doesn't fight me.  I'm asking for an editor that doesn't require me to learn it just to write some goddamn code.


Current Mood: frustrated
Saturday, February 7th, 2009
12:23 pm
Opinions on functional languages
I've been thinking lately that I should try to learn some real functional language to a significant degree, and not just rely on what I've picked up around the edges from Ruby, PostScript (not functional at all, but it and Forth have a lot in common with Lisp), XSLT and the little bit of Lisp and Standard ML I covered in Comparative Programming Languages.

I would have learned Haskell in college, as it's normally a prerequisite to Comparative to give the students some introduction to functional ideas; however, I got that excused to take as many 500-level classes as they'd give me. That would still be my default for something to learn on my own, except that I'm working mainly in .Net (and PL/SQL, but that's not so relevant) for the foreseeable future, and I was thinking there's a much better chance I could eventually use F# professionally.

F# is supposed to be essentially OCaml with an adaptation of .Net's library system instead of the usual OCaml libraries. This puts me off a little because I really wasn't impressed with Standard ML when I was taking comparative; I got the impression it was mostly just good for math. Is OCaml better, am I being too hard on Standard ML, or is Haskell really a much better choice? And are there any major functional concepts I would pick up from Haskell but not OCaml/F#?
Tuesday, October 21st, 2008
5:03 pm
Stored procedures
This is more information systems than computer science, but it's not like there's been a flood of traffic here lately. Anyway, I just wrote this in response to this article, but I think it stands alone decently well.

I think by now anyone who's paying attention realizes that parametrized queries have the same advantages as stored procedures with regard to parsing/execution plans and SQL injection. The permissions advantages don't really exist anymore, either, since everyone is just connecting with one ID these days and setting up their own security systems. That doesn't mean there aren't still good reasons for using stored procedures:

1. It's frequently a lot less work for the DB server to just return answers or run a small job on its own than for it to return enough information to another tier for it to be done elsewhere. This may be bandwidth, or it may just be knowing when it can find an answer with an index and skip the real table.
2. Similarly, when programming stored procedures, you can just use the data you need, since it's right there, without worrying about what you do and don't need to pull between layers. You also don't have to have to make any distinction between data that's native to the environment you're working in and data that's using an interface to a foreign system (granted, an ORM gets you that benefit, too).
3. While stored procedures do require other people (DBAs) to get involved in a release, they also frequently allow problems to be fixed without rolling out a new version of the entire system.
4. Oracle isn't as good at this, but with Transact-SQL, you can frequently get jobs done with a lot less set-based relational code than the equivalent object-oriented approach would require.
5. In a stored procedure language, you always have good support for Nulls.
6. If you put *all* of your business logic in stored procedures, that actually gives you a pretty good MVC breakdown.
7. The database is the only layer that's *always* present, so doing work in stored procedures gives you a lot better resources when you're doing ad-hoc, one-time jobs.
8. If you change front-end or middleware architectures or languages, your procedures are still good.

As for downsides, yes you have vendor lock-in (so stored procedures are largely ruled out if you're writing software for other companies to run at their own sites), and yes, many programmers just aren't very good at SQL. Also, you then have to deal with a database interface (and probably manual code check-ins), as well as your IDE. And automated testing becomes a much more do-it-yourself affair.
Tuesday, June 24th, 2008
11:41 pm
Social website Idea
Inspiration: Everywhere I go I see posted signs advertising www.yourcityheresingles.com. It seems like no matter how remote your location or how minimal your local population, there now exist websites devoted to finding singles in your area. As someone who hasn't had so much experience being single, but LOTS of experience being "lonely" and seemingly "friendless" amongst a HUGE population of people my age, I feel that a website for networking is long overdue. Sure we may live in large cities but rarely do we venture outside our circles when we go out. If you're in a relationship, bar outings typically involve you, your significant other, and either your own or your significant other's friends and their partners. Rarely do we involve ourselves with new faces outside of work or school and even if we want to, rarely do we introduce ourselves to new strangers when faced with the comforting presence of our current friends. As a former member of various sub-cultures including punks and ravers, this "random" meeting of new people with similar interests is an almost guaranteed outcome of attending the various musical events associated with your "scene." I definitely took this for granted in college, meeting 2-a dozen new faces each evening without even trying. If you've been involved in a sub-culture you understand. Simply asking to bum a cigarette or paying someone a compliment on their wardrobe or dance technique is an easy enough way to find a new friend. Then I entered the "real world," full of business types and outgoing yet reserved people, social enough to find themselves in a bar trivia night yet frightened/uninterested enough to avoid social contacts beyond the group they arrived with. Unfortunately I place myself in this category as well; it's not that I don't want to meet new people but when you're already with 10 other people it just seems misplaced and sometimes desperate to strike up conversation with an unknown neighbor. And yet I'm willing to bet there are many like me who have friends and a relationship, and are relatively happy with their life....but still long for others out there with MORE similar interests, or at least a change of the rehearsed, overplayed interactions we're accustomed to. So, my idea is simply to build a site with a basic profile, available for free, to people living in the same zipcode, who aren't looking for anything more than a friend with similar interests. If you're interested and have programming knowledge, please reply so we can get something started.
Tuesday, June 3rd, 2008
10:19 am
question in code
wrote some function to show all the cars which are in the parking lot, but I don't know why it works only till 2 cars. May you can help me to find it out why.

This is the function:

void Cars(Car *caris,int fuko){

[Error: Irreparable invalid markup ('<fuko<<endl;>') in entry. Owner must fix manually. Raw contents below.]

wrote some function to show all the cars which are in the parking lot, but I don't know why it works only till 2 cars. May you can help me to find it out why.

This is the function:

void Cars(Car *caris,int fuko){



for(int r=1;r<=fuko;r++){


that's the way I call it:

this is the definition of her: void Cars(Car *,int);

Thank you.

<a href="http://tinypic.com" target="_blank"><img src="http://i30.tinypic.com/15rjpy9.jpg" border="0" alt="Image and video hosting by TinyPic"></a>

the picture of that:
Thursday, May 15th, 2008
10:43 pm
Windows directory visualization tool
I quickly cobbled together a tool that can be used to visualize the content of the directory its run in. However, my C# is sorely lacking in modifying the code for it to become something like a shell replacement. I invite people to download the code and experiment with it: maybe you can finish what I started.


(cross-posted to relevant areas)

Current Mood: geeky
Tuesday, March 11th, 2008
12:16 am
"Computationally Intensive"
My advisor and I are debating some word usage. Since we're both statisticians, I figured I'd get the input of some computer scientists.

Suppose I have an algorithm that is incredibly slow, but is only O(T). (In case you're curious, it involves evaluating a slow-to-compute integral for each T.) Can I call it "computationally intensive" even if it is O(T)? If not, what can I call it?

Thanks for your help!

Current Mood: curious
Thursday, February 28th, 2008
11:01 am
Null, etc.
For a long time, I've wanted built-in language support for three distinct kinds of Null:

Unknown (what Null is treated as by SQL, now)
Not Applicable (like unknown in practice, but conceptually different -- outer joins would return these)
Absent (More like Nil in some languages than SQL's Null -- checks for equality would return true or false)

Absent for foreign key references is the really important one of these because it's an important thing to record, and databases currently have to chose between using Null (fighting SQL's built-in support for treating it as unknown, and muddying the distinction between that and things that really are unknown), using zero and leaving off foreign keys (just plain wrong, but unfortunately common) and using zero with matching zero-rows in the linked table (conceptually the best, but I've never seen it in practice, and can be misleading if you don't include "<> 0" in all your queries).

I was doing some PL/SQL math programming just now (billing, with thresholds stored in a table), and it occurred to me that infinity also really belongs on the Null spectrum, as it has similar propagation rules:
(Infinity > ANumber) = true
(Infinity < ANumber) = false
(Infinity > Infinity) = unknown
(Infinity > -Infinity) = true
(Infinity = ANumber) = unknown debatable, I know
(Infinity - ANumber) = Infinity
(Infinity - Infinity) = unknown
(Infinity + Infinity) = Infinity, etc.

Of course, any Null support at all in languages other than SQL would be a good start. Nil is a big part of what I like about Ruby, and I miss VB 6's variant type because it could store Nulls fairly smoothly when they came back from a database.
Friday, December 21st, 2007
2:23 pm
New here. Two questions.

1) Why does the NESL parallel quicksort have running time of O(log N) with N processors? The analysis seems to imply that parallel filter (selection) is O(1), like parallel map. But filter, unlike map, doesn't know the place in the destination array where an individual result will go. (NB: data-parallel functional programming uses arrays, not linked lists.) The fastest algorithm I could come up with for parallel filter is O(log N) time, using parallel prefix sum. This makes parallel quicksort O(log^2 N). On the other hand, Blelloch is a very respected researcher, so where's my mistake?

Update: my mistake was assuming that depth is equivalent to total running time with infinite processors. This isn't true, there's a logarithmic multiplier.

2) Why does PhotoSynth use sparse bundle adjustment to reconstruct camera positions and scene geometry simultaneously? Why not recover all camera positions first, from pairwise fundamental matrices, and then build the point cloud by the obvious algorithm?
Friday, December 14th, 2007
6:51 am
Announcing webcrush
I have a reliable version of webcrush working now. It is a site & file optimization program written in Ruby, that uses various OSS tools to shrink or optimize filetypes commonly used on websites.


Current Mood: geeky
Friday, September 28th, 2007
1:47 pm
Program Construction
I apologise, I have been newly made a computer scientist. I am doing a module calles Program construction* were covering quantified* notation hoare triples*, weakest preconditions, backwards derivation, emptying the range finding the values in an array, abstracted class reduction etc

I was wondering if anyone could recommend a text(s) for a beginner in this area.

xposted compscibooks
Wednesday, August 22nd, 2007
4:35 pm
Functional woes
Introductions would generally be in order, but I think geeks are more amenable to meeting people via questions.  Could just be my own interest projecting, though.


I've got a little bit of a quandary.  I decided a month or two ago to get into functional programming.  As for background, I program almost exclusively in C# (although there is always a little C++ hiding somewhere), which most people will recognize as a very imperative, object-oriented language.  I'm aware that C# 2.0 added several functional-like bits, and that C# 3.0 will continue that trend, but it's still all kinds of static.  I've been working with C/C++/C# for about 7 years now, and school before that was almost entirely devoid of functional concepts (aside from AI, which introduced them from the side, without really discussing them).

To that end, I've spent about a month pacing to and fro across the web, reading everything I can understand about Haskell, F#, Boo, Python, LISP, Scheme, and OCaml.  My major problem is that I have no clue how to think about problem solving in a "functional" way.  OOP was beaten so deeply into my skull that I can't help but start thinking about classes and interfaces the instant I need to do something.  I have a grasp on some of the ideas behind functional programming - things like computing via function composition, stateless programming with a lack of side effects, etc.  The problem is that I have no idea how one goes about writing anything more involved than the same factorial function I've seen eight thousand times without intermediate variables or side effects!

Anyway, I'm mainly wondering if anyone knows of a book, website, or whatever, that can help me understand how one goes about breaking down a problem to be solved in a functional language?  Tutorials seem to take one of two approaches:  complete beginner who has no idea how to add two numbers together in a language, and doctoral thesis that uses words longer than my arm in at least three sentences per paragraph.  I'm in between the two, and struggling to find helpful material.


Current Mood: frustrated
12:11 pm
Linear convergence and number of iterations
I think this is actually an easy question, but I'm feeling dumb, so I figured I'd ask here. (My excuse is that I'm really a statistician, trying to figure out an algorithm.)

What does an algorithm having linear convergence apply about the required number of iterations for convergence (within a fixed tolerance)?

In particular, I have an algorithm (the PCG algorithm, in case you're curious) whose convergence rate is linear in the square root of the condition number. If I could prove that the condition number was O(f(n)), would the number of iterations be O(sqrt(f(n)))? (My advisor thinks so; I can't get my head around it.)

Thanks in advance!

Current Mood: confused
Tuesday, August 21st, 2007
8:39 pm
Hey guys
I finished the very first low introductory level Networking/Architecture class and the Data Structuers class this past spring semester, and now I'm ready to take on Advanced Data Structures.
I remember this confusing aspect of a C++ program I did in Data Structures. I used NULL, but the compiler complained about NULL not being defined. So, I had to use the header file that was mentioined in the back of the textbook where all the header files are. Why would NULL be undefined WITHOUT the header file included? I remember my professor discussing this, but I forgot.

P.S.-The HARDEST program in Data structures was by far a program that converts an infix expression to a postfix expression. OMGosh that hurt my brain and I didn't even get it right when I submitted it, but oh well. That professor loved playing with his students' minds...he he...
Monday, July 23rd, 2007
4:12 pm
OOP doctrine
What's the rationale behind only allowing a constructor to call the superclass's constructor as the first line? That always struck me as bizarre in Java, and .Net seems to have copied it.

While we're at it, how about optional parameters? C++ has them and classic VB has them, and I've written a fair amount of Java code that simulates them with method overloading (it can be done as long as there aren't many, but it's a nuisance). VB.Net has both optional parameters *and* method overloading, like C++, but C# only has method overloading. That would seem to indicate that they're frowned upon, but included in VB.Net for VB6 compatibility. Optional parameters are a useful feature; are they conceptually objectionable somehow?
Friday, April 6th, 2007
10:40 pm
Hello *wave*
I thought I'd poke people with a bit of an introductory post, seeing as it appears to be the done thing on this community. My name's Bob, I'm doing my PhD in computer science at the moment. My chosen area of research is into Functional Programming, and specifically debugging. I'm a bit of a self professed Haskell guru, although I tend to have a very different style to most Haskell programmers -- I tend to keep everything very very pure, and avoid monads at almost any cost (unless there's a really clear reason why monads make sense).

My other areas of interest are type theory (type checking algorithms side of things, not the "yet another type extension that expands the accepted program space slightly" side of things) and formal definition/correctness proofs.


Sunday, March 18th, 2007
12:07 am
Hash code formula, anyone?
I have a dictionary to store into a hash table. I want the words to be grouped together by anagrams (for example, toxic and ioxct would be in the same bucket).
I am aiming for minimal collisions and an efficiency of O(log n) or less when being probed.

Does anyone have any ideas or suggestions for a formula for generating my hash code?
Wednesday, January 31st, 2007
9:11 pm
James Gray MIssing at Sea
James Gray (Turing Award winner) is apparently missing at sea. He went out on his sailboard to scatter his mother's ashes, and hasn't returned. Hope he's found OK.


Current Mood: concerned
Tuesday, January 30th, 2007
10:01 pm
Hi, I'm new to the community. I study Graphics Design (this is my first year) but we started with Computer Science in general. I have no idea about programming and I don't get pascal at all... Can anyone help me with writing a program?

I'm supposed to create a program using Delphi7 (=> console type). There's a .txt file with a list of 4 students, the number of their grades and the list of the grades. The program should count the average of the grades for each student and then sort the names by the average, lowest to highest.

list of studentsCollapse )

I tried to do it myself but I'm a poor programmer. Here's what I came up, but most of it is probably wrong.

progCollapse )

If somebody can help me I'd be really grateful. I promise to study more on the pascal in the future.

Current Mood: hopeful
[ << Previous 20 ]
About LiveJournal.com