Re: Seeking computer-programming job (Sunnyvale, CA)

K

Kaz Kylheku

Phlip wrote:


Neither "world" nor "power grid" are coined proper nouns as "Internet" is,
referring as it does to a specific network given its name via a standards
document, namely RFC 675. It is, of course, your right to be wrong.

Evidently, folks, sometimes ``plonk'' means ``I will henceforth follow up to
your articles, but with a double >> before all your text instead of
a single > .''

Maybe this twit should read the RFC's that explain the difference between
e-mail and Usenet, and then get a real newsreader with proper killfile support.
 
S

Seamus MacRae

Frank said:
Well, it does tell that you rely on the compiler to check the type of an
object. I do say that a pure static typing is a PITA when aiming at
reusable code. I had to do coding where I could not foresee all possible
data types being used - just "objects".

That's why we Java programmers have the Object class, generics, and
other goodies. For example if we want to require that some objects have
a run() method, but nothing else, we can use a List<Runnable> to hold
them, and they can be of many different actual types. And the compiler
will alert us if we try to put something non-runnable into the list.
 
S

Seamus MacRae

Frank said:
They are what makes Usenet the real Usenet. Besides, my statement was
just pure observation and personal opinion. Taking it as an insult only
comes from a - hm, how to say this without being interpreted as personal
attach again - well, maybe you suggest something yourself here and the
whole bunch of readers can stop laughing as laughing would be a kind of
reaction highee educated people than me classified as a human reaction
on stimuli .... eh - where was i ?

Rambling incoherently.
 
J

John B. Matthews

Can you do me a favor and try it (I have no possibility to do).
I would be interested to know whether it compiles without
changes and wether some explanations are needed in the
file src/read_me.txt .

Thanks for your effort in advance.

Using Mac OS X 10.5.7, gcc version 4.0.1 (Apple Inc. build 5490), I did
this:

tar -zxf seed7_05_20090510.tgz
cd seed7/src/
cp mk_osx.mak makefile
make depend
make
cd ../prg

I got 147 warnings and the following result:

../hi hello.sd7
HI INTERPRETER Version 4.5.4741 Copyright (c) 1990-2009 Thomas Mertes
262 /Users/matthews/Desktop/seed7/lib/syntax.s7i
3518 /Users/matthews/Desktop/seed7/lib/seed7_05.s7i
30 hello.sd7
3810 lines total
224117 lines per second
1694928 bytes
hello world

[Details sent via email.]
 
A

Alan Morgan

(yadda, yadda, yadda)

Yes, but can you write a GUI app in any dialect of Lisp and port it
easily to Windows, MacOS, and Linux, and distribute it as a simple run-
this-installer-and-away-you-go form convenient for end-users?

This is the test a language or implementation must pass before it will
see much use outside of academia and unique deployments (like that
insurance company's internal systems).

Oh, hardly. C and C++ barely pass this (unless you use a third party
library which (a) hardly anyone ever does and (b) could be used from
Common Lisp as well with the appropriate bindings) and there are *plenty*
of programs that are designed to run on one OS or don't have much of
a GUI or, perhaps, have a small amount of OS specific code in one little
area. That assumes that you care about the non-Windows section of the
market, which most people don't.

Lisp may not meet your needs, but the fact that it doesn't does't make
it useful only for a bunch of pencil necked geeks in their ivory towers.

Alan
 
F

Frank GOENNINGER

Seamus MacRae said:
Rambling incoherently.

Isn't Usenet wonderful ? You learn something new every day. For some it
means learning something new about themselves, well, maybe not every day.

Oh, btw, either we end this thread now or we give it a more appropriate
topic ...

Frank
 
F

Frank GOENNINGER

Seamus MacRae said:
That's why we Java programmers have the Object class, generics, and
other goodies. For example if we want to require that some objects
have a run() method, but nothing else, we can use a List<Runnable> to
hold them, and they can be of many different actual types. And the
compiler will alert us if we try to put something non-runnable into
the list.

No dynamically (= at run time) created classes? Rare case, you say?

So many opinions ...

Frank
 
S

Series Expansion

You can get a Pentium computer for a couple bucks at a swap meet, and a Ubuntu
CD for free. Boom - a fully modern OS with every programming tool known to humanity.

Oh, then he needs a network connection.

Which costs, and through the nose. A cheap, barely-usable dialup
connection starts at $20/mo. Robert's gonna have to cut out eating
meat and just have bread and potatoes, at least until he lands that
job.

Broadband will cost more than twice that, and to do any sort of client/
server stuff will probably be necessary. Where can Robert get that
much money out of his budget? Broadband, cable/satellite TV, phone
service, and other utilities all tend to cost around $50/mo so he
could try cutting another one of those. Not power, though, he needs it
for the computer. Nor phone service, without which how will he phone
up companies applying for a job? Or arrange interviews, or do a lot of
ordinary tasks for that matter. Looks like Robert has to cut out TV
entirely, or no broadband, or no food.

Robert has a problem.

This is presupposing he can find all this stuff at "a swap meet". I
don't know about you, but where I live you can't just take a stroll
down the street and find computers going for cheap at garage sales or
similar at any random time. Most likely, Robert will need a car to
have the range needed to obtain and transport this thing. (A bus won't
do -- they probably won't let him carry a bulky box of computer and
parts on it -- and bicycling is clearly out of the question.)

Cars cost through the nose to own and operate.
 
S

Seamus MacRae

Frank said:
No dynamically (= at run time) created classes? Rare case, you say?

So many opinions ...

Java can create classes at run time. As a rule, these will implement an
interface, so existing interface but novel implementation of it.
Sometimes, an abstract superclass.

PropertyResourceBundle is one example. Any dynamically-loaded
implementation of a service-provider interface, such as in JAI and a lot
of JavaEE and networking stuff, will provide more examples. You can even
generate Java source code and invoke the compiler classes to compile
them on the fly, then use a classloader to instantiate the results.

Last but not least, Java can even use a completely unfamiliar class that
implements no known interface, but you'll have to use reflection to do
anything with it at all, and reflection is slow and brittle.

In fact, using nothing but Object-type references and reflection, with
no interfaces, and having a lot of NoSuchMethodExceptions and the like
to handle, resembles trying to do OO programming in many of your
dynamically-typed languages.

Java 6's inclusion of a compiler API means it's relatively easy to
translate almost arbitrary Smalltalk code into Java. (Blocks need to be
faked, but can be; you can use objects and reflection, or use arrays to
fake mutable local variables visible inside the closure and some sort of
exception to fudge the nonlocal returns.)

However, trying to actually code that way in Java will give you a headache.
 
K

Kaz Kylheku

That's why we Java programmers have the Object class, generics, and
other goodies. For example if we want to require that some objects have
a run() method, but nothing else, we can use a List<Runnable> to hold
them, and they can be of many different actual types. And the compiler
will alert us if we try to put something non-runnable into the list.

Okay, so now I have code dealing with List<Runnable>. What if some other code
just has a List<Object>? It's known that all the objects in that list are in
fact runnable. Oops, that code can't pass the List<Object> to code that works
with a List<Runnable>. You've marred the nice concept of a list with this
additional static type attribute.

Of course, you can write routine which will convert one type of list with
another---with a suitable dynamic check that everything being carried over is
Runnable.

Or you can invent some shim, like a MaybeRunnable wrapper object.
A MaybeRunnable would be some type which is itself runnable,
and holds either an Object or a Runnable. If it holds a Runnable,
then its run method delegates to the Runnable's run method,
otherwise it provides some default behavior.

Now you have the ugly problem that the MaybeRunnable doesn't have the same
identity as the object it encapsulates; it has its own identity. If you have a
routine which, say, searches a list of objects to find one which matches a
given one by identity, it won't work on a list of MaybeRunnable adapters
without additional obfuscation.
 
L

Lew

Which costs, and through the nose. A cheap, barely-usable dialup
connection starts at $20/mo. Robert's gonna have to cut out eating
meat and just have bread and potatoes, at least until he lands that
job.


My local library offers free Internet access. Many local
establishments offer free wifi. Obviously Robert has an Internet
connection or he wouldn't have posted to Usenet. He must have some
money or someone supporting him, or he'd be dead by now.

Many government programs exist to provide training in things like
computer programming. Sometimes friends or relatives will provide the
necessary equipment. I personally know of people who have had pretty
decent computers donated to them by relatives to help them get a leg
up. (By "pretty decent" I mean powerful enough for the needs Robert
has evinced.) I have read about charitable organizations, churches
and the like who have had equipment donated to them that would meet
Robert's needs.

And this is just off the top of my head. I'm sure there are thousands
more viable options at least some of which would let Robert develop
the skills he would need for the jobs he claims he wants. For sure he
hardly needs you arguing in favor of his continued poverty and holding
him back through your negative thinking.

Why are you giving him more excuses? Everything you object to so far
is solvable for free or close to it.

I notice that you ignored the suggestion that he get a job needing
lesser qualifications to pay for essentials and to give him a basis to
enhance his circumstances.
Robert has a problem.

He said so himself.
This is presupposing he can find all this stuff at "a swap meet". I
don't know about you, but where I live you can't just take a stroll
down the street and find computers going for cheap at garage sales or

I don't know about you, but some people committed to improving their
circumstances actually take action to do so, instead of ranting about
irrelevancies. The point is that lack of computer equipment and an
Internet connection (which latter, again, Robert clearly has), and
concomitant lack of skills, are solvable problems. Provided a person
wants to spend their energy solving them instead of arguing about why
they can't.
 
S

Seamus MacRae

Kaz said:
Okay, so now I have code dealing with List<Runnable>. What if some other code
just has a List<Object>? It's known that all the objects in that list are in
fact runnable.

Then the code is poorly-written because it loses type information.

The "other code" here presumably doesn't need to know the objects are
runnable, because it doesn't need to run them. There are two
possibilities: it generates the list, or it merely transforms the list
in some way.

If it generates the list, it's not supposed (in this context) to
generate a list with non-runnables. Either it's supposed to generate a
list with runnables, so should use List<Runnable>, or it's responsible
for making the list but not the individual objects, so it should use
List<T> and accept a Factory<T> (or whatever) to produce the individual
objects, and be called with a Factory<Runnable> resulting in a
List<Runnable> in this particular instance.

If it merely transforms the list, and doesn't care whether they're
runnable, it should not matter. Suppose it sorts the list by priority.
In that case, it wants a List<T extends Comparable<? super T>> or a
Comparator and a List<?>. In the latter case it can be passed a
Comparator and a List<Runnable>, will do its thing, and afterward the
calling code can use the List<Runnable>, which is now sorted. In the
former case, it can be passed a List<PriorityRunnable> where
PriorityRunnable implements Runnable (with an abstract run() method) and
Now you have the ugly problem that the MaybeRunnable doesn't have the same
identity as the object it encapsulates; it has its own identity.

This can indeed sometimes be an issue with the decorator pattern, but in
this particular instance that pattern is wholly unnecessary; see above.
 
K

Kaz Kylheku

["Followup-To:" header set to comp.lang.lisp.]
Then the code is poorly-written because it loses type information.

The "other code" here presumably doesn't need to know the objects are
runnable, because it doesn't need to run them. There are two
possibilities: it generates the list, or it merely transforms the list
in some way.

If it generates the list, it's not supposed (in this context) to
generate a list with non-runnables. Either it's supposed to generate a
list with runnables, so should use List<Runnable>, or it's responsible
for making the list but not the individual objects, so it should use
List<T> and accept a Factory<T> (or whatever) to produce the individual
objects, and be called with a Factory<Runnable> resulting in a
List<Runnable> in this particular instance.

If it merely transforms the list, and doesn't care whether they're
runnable, it should not matter. Suppose it sorts the list by priority.
In that case, it wants a List<T extends Comparable<? super T>> or a
Comparator and a List<?>. In the latter case it can be passed a
Comparator and a List<Runnable>, will do its thing, and afterward the
calling code can use the List<Runnable>, which is now sorted. In the
former case, it can be passed a List<PriorityRunnable> where
PriorityRunnable implements Runnable (with an abstract run() method) and
implements Comparable<PriorityRunnable> and get/setPriority(), with
compareTo() using getPriority().

At this point, you are building a nice case /against/ static typing; namely you
are erecting piles of useless crap which doesn't actually do anything, other
than check itself for consistency at compile time.

The information content in that crap far exceeds that in the actual problem
being solved, and this is somehow supposed to reassure us that all is well.

I suppose it's an argument of size. Look, we have reams of crap which is
beautifully self-consistent, so it's probably right. The actual logic of the
solution to the original problem constitutes 5% of this crap. Now what are
the odds that there is a bug in it, given that it has logical connections
to something 20 times bigger than itself, which compiles 'n everything?

Also, our defect rate is diluted 20:1. If we make a mistake in the 100 line
dynamic language program, that's one defect per hundred lines. But now,
let's add 1900 lines to make it a static program. Those lines all compile
beautifully and are /provably/ harmless, since they have no run-time semantics.
Now we have a 2000 line program with a defect rate of 1 per 2000 lines.
Our software metrics are telling us we're doing something right;
our process must be getting more mature!
 
S

Series Expansion

My local library offers free Internet access.  Many local
establishments offer...

All fine and dandy if all you want to do is a little web surfing. But
developing and testing client/server apps and J2EE stuff?

Somehow I doubt it.
 
S

Seamus MacRae

Kaz said:
At this point, you are building a nice case /against/ static typing; namely you
are erecting piles of useless crap which doesn't actually do anything, other
than check itself for consistency at compile time.

Au contraire. They check everything else for consistency at compile time
too. The code that puts things in the list. The code that takes things
out. The code that runs them.

The information that "the things in the list should be runnable" has to
be expressed in the program somehow. In a dynamically-typed
implementation, it would be implicit in the code -- unless the code had
bugs, and then the intent would not be clear. Was it an error that a
non-runnable went into the list, or was it an error that something else
assumed everything taken out of the list was runnable, or was something
else wrong entirely?

The intent could be made clear by adding comments, but now the same
information is in two places: in the code and in comments, and they can
get out of synch.

Or you can use static type checking. Then the types in the code document
the intent, and the things that have to be consistent (the information
about intent, and the actual objects put in the list and actions
performed on the items taken out) are checked for consistency
automatically by the computer to boot. They can't get out of synch. And
if there's an error, the intent is clear. If a List<Object> item is
assumed Runnable assuming they're runnable is the error. If a
non-Runnable is put in a List<Runnable> putting in a non-runnable is the
error.

Problem solved.
The information content in that crap far exceeds that in the actual problem
being solved, and this is somehow supposed to reassure us that all is well.

True if you're making a small system. That's why dynamic languages are
convenient for quick-and-dirty one-offs.

False if you're making a large system. It may have O(log N) types in it
versus O(N) operations, and now the information in the "crap" (O(log N))
is greatly exceeded by that in the actual problem being solved (O(N)).

Java starts to look good when you're working on a big system instead of
a little one.
Also, our defect rate is diluted 20:1. If we make a mistake in the 100 line
dynamic language program, that's one defect per hundred lines. But now,
let's add 1900 lines to make it a static program. Those lines all compile
beautifully and are /provably/ harmless, since they have no run-time semantics.
Now we have a 2000 line program with a defect rate of 1 per 2000 lines.
Our software metrics are telling us we're doing something right;
our process must be getting more mature!

You're forgetting that the 1900 lines will not only check themselves,
but also find type errors in the remaining 100 lines. And that those
1900 lines become only 5000 or so when the other 100 grow to 1,000,000,
tilting the numbers sharply the other way.

P.S. please don't try to hijack replies to groups I don't even read.
Thank you.
 
S

Scott Burson

Robert Maas,http://tinyurl.com/uh3twrote:

...> As for jobs I really qualify for, I haven't seen one in more than a

...

If I wanted a job, and was not qualified for any recently advertised
jobs, I would do the following:

1. Pick a skill set that is needed both for advertised jobs, and for at
least one major, well-known, active open source project.

2. Get studying. Study the chosen skill set, and also the open source
project.

3. As soon as possible, start contributing to the project. In the early
stages, use general programming skills to analyze bugs. As I built
knowledge of the project and the skills, I would expect to be able to
propose implementations of requested enhancements.

The objective would be to simultaneously build three things: in-demand
skills, a body of code to which I had made significant contributions
using those skills, and set of programmers with whom I had good
cooperative relationships.

4. Apply for jobs that need the skill set, pointing to the open source
contributions as evidence of recent experience, and asking other
participants to act as references.

I think this is an excellent plan.

Since you claim to have good math skills and some AI experience, I
will offer a specific suggestion. Data mining is a booming area right
now, and there are open-source data mining packages. Contributing
significantly to one of these, and being familiar with its use, would,
I would expect, get you a far better job than you could ever get doing
ordinary programming.

-- Scott
 
L

Lew

Series said:
Series said:
All fine and dandy if all you want to do is a little web surfing. But
developing and testing client/server apps and J2EE stuff?

Somehow I doubt it.

Luckily your doubt does not determine reality.

All I'm saying is that Robert could find a way to learn these skills even if
he is rather tight for money. I know poor people who have enough computer to
learn client/server apps and Java EE "stuff", should that be their bent, even
though they receive public assistance and have rather low-paying jobs. It
might not be the fastest connection or the fastest computer, but it's enough
for a determined person to practice the skills to the point where they'd
qualify for a job in the field. Furthermore there are companies that will
train you in computer programming for free, and if you do well in the training
will pay you during your training period, then farm you out to their clients
for a year after you complete the training. Sure, you're paid less than most
programmers, but you get more money than the night shift at your local
convenience store with much less chance of being held up at gun point, and you
come out with programming training and a solid year of experience, and a lot
more income than earned sitting at home blaming everyone but yourself for your
misfortune.

All the nonsense you've been spouting represents hurdles to be sure, but
surmountable ones. You can choose to be one of the whiners if that's what you
want, but no one else should be fooled by your B.S.
 
A

anonymous.c.lisper

Get a job (any job) to pay the bills first.
Which costs, and through the nose. A cheap, barely-usable dialup
connection starts at $20/mo. Robert's gonna have to cut out eating
meat and just have bread and potatoes, at least until he lands that
job.

Broadband will cost more than twice that, and to do any sort of client/
server stuff will probably be necessary. Where can Robert get that
much money out of his budget? Broadband, cable/satellite TV, phone
service, and other utilities all tend to cost around $50/mo so he
could try cutting another one of those. Not power, though, he needs it
for the computer. Nor phone service, without which how will he phone
up companies applying for a job? Or arrange interviews, or do a lot of
ordinary tasks for that matter. Looks like Robert has to cut out TV
entirely, or no broadband, or no food.

Robert has a problem.

This is presupposing he can find all this stuff at "a swap meet". I
don't know about you, but where I live you can't just take a stroll
down the street and find computers going for cheap at garage sales or
similar at any random time. Most likely, Robert will need a car to
have the range needed to obtain and transport this thing. (A bus won't
do -- they probably won't let him carry a bulky box of computer and
parts on it -- and bicycling is clearly out of the question.)

Cars cost through the nose to own and operate.

Anyway, good luck Robert!
 
S

Seamus MacRae

eric-and-jane-smith said:
But what if it does care? What if it takes a list of a million objects,
and deletes 17 of them from that list, because those 17 aren't runnable?

In Common Lisp, deleting 17 objects from a list of a million can be done
quickly and efficiently. But you seem to be implying you have to copy the
other 999983 objects to a list of runnables, because otherwise they would
be in a list of objects, even though they're all runnable.

Not in Java. In Java, you can use:

/**
* Removes non-<code>Runnable</code> objects from <code>list</code>
* and returns pruned list as a <code>List&lt;Runnable&gt;</code>;
* caller is responsible for synchronizing the list if necessary.
*/
@SuppressWarnings("unchecked")
/*
* Justification: the only unchecked cast is in the return
* line, and all non-Runnables have been removed from the
* list at that time. The returned list is a list of
* Runnables unless a data race occurred. Correct behavior,
* as ever, depends on the caller synchronizing where
* appropriate.
*/
public List<Runnable> pruneList (List<?> list) {
for (Iterator<?> i = list.iterator(); i.hasNext();) {
// Old "for" used intentionally
Object o = i.next();
if (!(o instanceof Runnable)) i.remove();
}
return (List<Runnable>)list;
}


Untested. The intent should be pretty clear, though. The reason for
using the old "for" is to get efficient removal. Performance is O(n) for
a LinkedList, and no copying is done.

A version that copies the list would be thread-safer:

/**
* Makes and returns a copy of <code>list</code> with only the
* <code>Runnable</code> objects, whose order is preserved;
* caller is responsible for synchronizing the list if necessary.
*/
public List<Runnable> pruneList2 (List<?> list) {
List<Runnable> ret = new ArrayList<Runnable>(list.size());
for (Object o : list) {
if (o instanceof Runnable) ret.add((Runnable)o);
}
return ret;
}

This makes a copy with only the runnable objects. Copy cost is O(number
of runnables in source list). Only pointers are copied, rather than the
actual objects in the list. The cast to Runnable should never fail. No
unchecked cast is used in this version. With respect to threading, since
the result list is local until the method exits and the object is local
from before the instanceof test until insertion in the result list:
1. The result list will never, EVEN WITH a data race, come out
containing a non-Runnable.
2. A weak consistency may apply to concurrent use of the source list:
an object in the output list will have been in the input list at the
time of the method call or added while it was running, and an object
not in the output list either was not in the input list at the
time of the method call, was removed while it was running, or was not
Runnable. Whether this actually works depends on whether the source
list has (at least) weakly consistent concurrent iteration and
modification. The java.util lists don't; this method may throw
ConcurrentModificationException. The java.util.concurrent lists are
another matter (for instance, CopyOnWriteArrayList).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top