| |
| |
| |
|
Page: 1 2 3 4 5 6
Comments:
<0> I don't know what the best approach is, but I'm probably gonna have a bash(tm) at using a scripting language or Java to drive my build, ***isted by ant. <1> crookery: yeah, which adds to the problem. <0> Maybe for my next toy project. <0> Clackwell: Got any public projects, sir? <2> help! what does "execute against" mean <1> "nono, this is not a scripting language. you have to think around two, three additional corners to do the same thing as in a script file." <0> Clackwell: Because it's ***umed that you should script in it. <0> Clackwell: I think the XML format was a mistake and it should have embedded a scripting language interpreter from the start. <0> Turing complete and all that jazz. <0> As it is, build.xml is not designed for scripting, but for declaring. <1> crookery: yes, i am aware of that. i had a little clash over that with jeffrey hoyt, one of the pals working on jedit, busily building plug-ins, etc. he isn't a java head, and didn't manage to recreate a build file that does the same simple stuff like my "build" script. and that's where the work on my plug-in ended as far as the jedit community is concerned. it isn't ready to be put in there anyway, in my opinion. <1> (aware of having ant build files in public projects) <1> and i even agree with that. it's just that i can't be bothered learning a tool which does not provide any immediate benefit to me. <0> Ant has no immediate benefit? <1> to me? does it? which one? <1> learning effort is a considerable hurdle for me. i disagree with "the amount required learning effort does not matter, because anyone can learn it and it's a one time thing to do anyway".
<1> it defies human nature and how the human brain works. <1> in my opinion. <1> things must be kept as simple as possible and require as few extra knowledge as possible, in general. <0> Ant is good because all the IDEs can use it, the command line user can use it, it's a standard, it works where Makefile is awkward (e.g., non-root accounts without all the tools installed are a pita with Makefile), it's simple, unless you make it complicated, and it has a fairly good standard set of tasks. <1> crookery: those things do not apply to me directly, they would "only" make my projects more accessible out of the box. <0> My own buildfile is pretty simple I think, I don't see the problem. <3> While I agree that all IDE's can use it it doesn't imply that to use an IDE you'll immediatly benefit when knowing ant. <0> Lion-O: I can run my automated tests from within my IDE, which currently I don't do with ant, but I don't know why. I vary whenever I reinstall Eclipse. <0> I can also run them on the machine I use for my source repo. <1> and even there i doubt how far that goes...just think about building stuff on linux. sometimes it works, sometimes it doesn't. i am not sure ant really avoids that situation. <0> With virtually no effort. <0> 'ant unittests' done. <0> Clackwell: I've not come across one platform-specific issue with my ant builds yet. <0> Not even where ssh is involved, where I'd expect problems. <0> I think you're imagining problems. Ant isn't perfect, some stupid design decisions, but it works. <1> crookery: yes, i'd expect problems there too. but there are always more ways to get things wrong than getting them right. given that i would ***ume that many people get their ant stuff wrong. <1> make works, too. <0> I never got make to build recursively in a way that I liked. <0> I ende up making make call find for that. <1> it's not the imagined problems i am not using ant for. those just make a little dent in the overall usefulness that can be expected of ant. which is still considerable and beyond doubt - unless you have corner cases like me. <0> Ant does it like thus: <javac src="src/"/> or similar. <0> What's your corner case? <1> crookery: not seeing the immediate benefits of ant for me. <0> For corner cases, where you actually want scripting, drive your build from a programming language, like Groovy or Java. <0> What do you build with now? <1> instead i have to invest time to end up with the same functionality that i already have. <0> Clackwell: Heh, that's a Big-Oh problem. <0> I want to get to work and back every day, but I don't have a driving licence, so I'll walk. <0> Getting a driving licence doesn't help me get to work on that day so I won't bother. <1> crookery: a bunch of script files. copying files, compiling a few cl***es, starting db server, initializing the db, checking the db contents, shutting down the db, firing up the installer maker (nsis), simple stuff like that. <0> Er, I just summed up my life. <1> crookery: i wouldn't have benefitted from ant in retrospect either... <0> Clackwell: Do those scripts work on every platform that Java does? <1> crookery: they don't need to. <0> YAGNI, yes. <1> instead they only work on windows - and everyone in this company can debug them. most people in here haven't even heard of ant before. <0> So are you mainly MSCDs? <1> no <0> What's the specialism? <1> crookery: come again? <0> Main technology. <0> The stuff your shop is good at. <1> the practical problem with introducing new stuff is that you have to convince people (esp. managers) to invest time in advance. that is hard to do if all i can say is "it's the standard tool in the java world. it will make it easier for other developers to build our (closed source) project. and it will help making the transition to other platforms easier, should we ever get there." <0> Except ant takes all of 5 minutes. <1> crookery: that's not true, you know that very well. <0> You wouldn't even have to replace your scripts with ant, just say, use it to compile your cl***es, and call it from your scripts. <0> For compiling some cl***es, it is very very simple. <4> and he'd gain...what? <4> a load of effort in installing it, and....he'd be using ant <0> Expertise! <1> everyone around here knows windows scripts, even unix scripts. you can go about introducing the next allegedly hot thing every month, but is it useful to do that? will people welcome you trying to shove that next hot thing down their throats? in my company - definitely no, they won't. <4> I didn't find ant that useful, really <1> crookery: what for? <4> another one of the "XML For everything!!!!" croud <0> Clackwell: For Java programming, ant makes sense. For your other stuff, maybe not. <1> just so i use the alleged standard tool? is that all you have to offer in favor of ant? <1> (to me and my case, that is.) <1> that's not good enough. <0> It's a tool that has IDE support, so when you, say, try IDEA out, you can have it pick up your configs from your build.xml, or whatever. <0> Even vim can use it.
<0> :help makeprg, :help efm <1> that standard tool is not a standard in this shack. in this shack people have long standing knowledge with other, simple tools which cut it just as well. <4> vim can use shell scripts <4> it's a good system, if you've already got a source base using it <4> if you're creating something new, sure, may as well <4> otherwise, the benefits are negligable <0> If you have any staff turnover, it may be worth investing in standard tools, where they do not lose you anything. <0> I know that on a project I worked on where people got cycled in and out, it was expensive to keep training people up in the [pos] tools we used. <0> I do know what you mean, and it was my opinion for a while too. I do not wholeheartedly 'believe' in ant, but it works for me. <4> if you hire anyone who can't use (bash|BAT), then you're in deeper trouble than any training can provide <0> Asriel: Hehe. <1> crookery: well, i can see that happening with non trivial tools. simple shell scripts which fire up a few executables and similar stuff? no, those belong in that category. we'd be more inclined to use our own java variant language to write a complete build script/program even. <0> bash is covered on degree programmes, and ant isn't, from what I've seen. ;) <1> and that would run on all platforms support by our vm. <1> don't belong, rather <0> Anyway, I should get out of the bath. <1> don't drop the notebook <0> Already pushed it away. <0> There's no progress. The bath used to be portable, the computer static. Things have just swapped. <1> :) <5> hello <1> hi <5> I have a problem with Vector. I have a Vector with objects of my own type and i want to find a object in the Vector. When i try to use Vectors indexOf() function to find a object it doesnt work. <6> Try implementing the equals() method on your object. <5> yeah i did <5> still not working <1> indexOf goes by equals? not by reference equivalence? <5> even tried to put System.out.println() in the equals function but its never printed <5> its just like its never used <6> In that case, I stand corrected. Sounds like Clackwell as the answer... <1> "Searches for the first occurence of the given argument, testing for equality using the equals method." <1> nope :) <6> Oh. Well then! <1> Nickenyfiken: post the signature of the equals method. <1> the cl***ic. <5> public boolean equals(User user) <1> tataaa <5> :-/ <5> hehe <1> Nickenyfiken: got it? <5> Object instead of User? <1> you could say that java prefers exact parameter type matching over extended types. <5> hmm sorry i dont understand <1> Nickenyfiken: look at the declaration of equals() in the api docs. <1> if there are two methods, equals(Object) and equals(User), and you do xyz.equals(aUserObject) - which method will java use? <1> apply the information that you have already given us (the debug output in your equals implementation never showing up). <5> So it does use equals(Object)? <5> so i want to override that default function <5> so i write my own public boolean equals(Object obj)? <1> there are two equals methods. yours is not being called. <shrug> not much left to try :) <5> public boolean equals(Object obj) <5> { <5> User user = (User)obj; <5> return this.id == user.id; <5> } <1> ouch, ouch <5> seems to work but is it correct? <1> what of obj is not a User? <4> kaboom <1> if <5> if its not a Vector<User> it wont use User.equals() wither? <1> Nickenyfiken: welcome to your first (?) Cl***CastException. <1> Nickenyfiken: forget generics. they have absolutely nothing to do with this. <1> (aside of adding complexity where more simplicity would be nice.) <5> ok :-) <5> well i have no idea what to do <1> maybe pay attention? <1> we criticized the equals(Object) for an mistake obvious to us, not for the general approach. <1> again: what if obj is not a User? <5> if (obj instanceof User)? <1> aha, hot :) <6> There ya go
Return to
#java or Go to some related
logs:
pirate draik #linux #linux #linux #chatzone how to set sql hyip goldcoders #php apache_getenv SCRIPT_URI #php #MissKitten
|
|