Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
gonadic io
Feb 16, 2011

>>=
I've written an implementation of the Game of Life in Haskell:
http://codepad.org/Pc5jQHrX

As always, any comments or criticisms are welcome but I did have a few specific questions:
- I'm using a representation where the state of the board is a set of live cells. To find a cell's neighbours, the entire list needs to be searched though. A way I might get around this in other languages would be to have the set contain pointers to the cells in a 2D array, to let me get a cell's neighbours in O(1) time while still meaning I'm not searching through regions of empty space. How would one go about doing this in Haskell?
- In theory, using a set rather than an array means that there is no upper limit to the number of cells and I didn't think about resizing the array as needed until it was too late. Is this a preferable solution or does it not really matter?
- Currently, I'm using getLine so the user presses enter to display the next frame and ^C to stop evaluation. Is there some function sleep :: Integer -> IO () that, when evaluated, pauses for a while? not including 1000! `seq` putStr ""
- How is the style/logic/implementation?

edit: The next logical step would be to create a GUI for it. I've used HOpenGL before and it wasn't too bad, but I've heard good things about Cairo for 2D work, which this most certainly is. Any suggestions?

gonadic io fucked around with this message at 17:30 on Dec 24, 2011

Adbot
ADBOT LOVES YOU

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

AlsoD posted:

I've written an implementation of the Game of Life in Haskell:
http://codepad.org/Pc5jQHrX

As always, any comments or criticisms are welcome but I did have a few specific questions:
- I'm using a representation where the state of the board is a set of live cells. To find a cell's neighbours, the entire list needs to be searched though. A way I might get around this in other languages would be to have the set contain pointers to the cells in a 2D array, to let me get a cell's neighbours in O(1) time while still meaning I'm not searching through regions of empty space. How would one go about doing this in Haskell?

Data.Array provides conventional O(1) arrays, which can be indexed by a tuple if you want a multi-dimensional array.

AlsoD posted:

- In theory, using a set rather than an array means that there is no upper limit to the number of cells and I didn't think about resizing the array as needed until it was too late. Is this a preferable solution or does it not really matter?

If you're using arrays in Haskell, you'd probably be using immutable arrays and making a new array for each frame (using an implementation like DiffArrays which makes this operation extremely cheap). If you want to change the size of the array, you'd just create a new array with the new size for your next frame.

AlsoD posted:

- Currently, I'm using getLine so the user presses enter to display the next frame and ^C to stop evaluation. Is there some function sleep :: Integer -> IO () that, when evaluated, pauses for a while? not including 1000! `seq` putStr ""

Control.Concurrent provides threadDelay.

AlsoD posted:

- How is the style/logic/implementation?

If you don't care about the particulars of your Ord instance, I'd just derive it rather than define it explicitly.

Your set representation and the corresponding dead/live deduplication step you have to go through is a little insane. Your life might be simpler if you didn't have the Health parameter for a Cell. Instead, keep a set of just live cell positions, and as needed construct a set of just dead cell positions that may become live.

Off the top of my head, here's a different implementation. This avoids the deduplication phase you have, and (in my opinion) makes it simpler to read what the universe's rules are.

AlsoD posted:

edit: The next logical step would be to create a GUI for it. I've used HOpenGL before and it wasn't too bad, but I've heard good things about Cairo for 2D work, which this most certainly is. Any suggestions?

Cairo is reasonably nice to work with, presenting a very straightforward monadic interface to its API. Getting a Cairo context to work with is a bit messier; I suggest gtk2hs if you're comfortable writing against GTK, but if you aren't then you'll probably get too annoyed before you have anything that works.

SuperNintendo Chalmers
Mar 31, 2002

class after class of ugly, ugly children...
My work has a monitoring tool that was built in ActionScript/Flash that uses an AIR front end. The guy who built it has since left the company. We need to update and add new features to the tool but none of us know ActionScript/Flash; meaning this thing has sat for two years with no love.

So we have discussed porting it to HTML5.

The tool itself connects to a specific port on any given server you wish to monitor. Each server runs a perl module. The perl module reads an instruction file where you set the parameters of what you want monitored (Disc Space, heart beats, and tailing logs for specific errors, etc). The module then pushes the 'alerts' out the specified port and then any one with the tool(front end) running will get some sort of information displayed.

None of us know enough about HTML5 or ActionScript/Flash to pick this up, but something needs to be done. I've wanted to grab this project for a while, so I'm asking you fine gents which would be a better idea. Rework this from the ground up with HTML5 or try to slog through this guys very messy ActionScript? I don't know either language and really only know some basic Perl. Any insight would be helpful.

Johnny Cache Hit
Oct 17, 2011

SuperNintendo Chalmers posted:

My work has a monitoring tool that was built in ActionScript/Flash that uses an AIR front end. The guy who built it has since left the company. We need to update and add new features to the tool but none of us know ActionScript/Flash; meaning this thing has sat for two years with no love.

So we have discussed porting it to HTML5.

The tool itself connects to a specific port on any given server you wish to monitor. Each server runs a perl module. The perl module reads an instruction file where you set the parameters of what you want monitored (Disc Space, heart beats, and tailing logs for specific errors, etc). The module then pushes the 'alerts' out the specified port and then any one with the tool(front end) running will get some sort of information displayed.

None of us know enough about HTML5 or ActionScript/Flash to pick this up, but something needs to be done. I've wanted to grab this project for a while, so I'm asking you fine gents which would be a better idea. Rework this from the ground up with HTML5 or try to slog through this guys very messy ActionScript? I don't know either language and really only know some basic Perl. Any insight would be helpful.

I chose option 3: junk the whole thing and replace with a real monitoring system.

Nagois3 isn't the prettiest but works pretty drat well. Zenoss is supposed to be cool, but I've never used it. But either way there are a ton of good options out there that are free, work well, and are in wide use.

If you're either going to have to hack against a nasty codebase or rewrite it from the ground up, don't.

SuperNintendo Chalmers
Mar 31, 2002

class after class of ugly, ugly children...

Kim Jong III posted:

I chose option 3: junk the whole thing and replace with a real monitoring system.

Nagois3 isn't the prettiest but works pretty drat well. Zenoss is supposed to be cool, but I've never used it. But either way there are a ton of good options out there that are free, work well, and are in wide use.

If you're either going to have to hack against a nasty codebase or rewrite it from the ground up, don't.

Sadly that's not really an option(but I wish it was). I probably should have been more clear. We use Nagois and Zabbix for normal admin server monitoring. We've looked into extending those tools to replace this custom monitoring system but they don't have the functionality we need.

My company writes our own high frequency trading system. So the type of monitoring this tool does is extremely specific. And it's mostly monitoring very large log files and watching for database anomalies that happen in real time. It's looking for very specific things in the logs such as XXX stock hasnt traded for 15 seconds or XXX stock has unexpectedly traded when it was not supposed to. So we do have it monitoring some basic system admin stuff like disc space and heart beats but that's not its primary function. The other half of what it does is alert traders to issues. So everyone runs a copy of this monitoring tool and if, for example, the stock they control hasn't traded for 15 seconds, they get an audible alert at their desk in real time.

Johnny Cache Hit
Oct 17, 2011

SuperNintendo Chalmers posted:

My company writes our own high frequency trading system. So the type of monitoring this tool does is extremely specific. And it's mostly monitoring very large log files and watching for database anomalies that happen in real time. It's looking for very specific things in the logs such as XXX stock hasnt traded for 15 seconds or XXX stock has unexpectedly traded when it was not supposed to. So we do have it monitoring some basic system admin stuff like disc space and heart beats but that's not its primary function. The other half of what it does is alert traders to issues. So everyone runs a copy of this monitoring tool and if, for example, the stock they control hasn't traded for 15 seconds, they get an audible alert at their desk in real time.

Aah, I see. If nothing will work off the shelf, it's hard to make a recommendation without knowing more. How significant is the existing codebase? Are we talking 5 KLOC or 500? How broken is it? Does it use any decent practices or is it a morass of spaghetti code and sadness?

If you're in the position to do a rewrite, it sounds like a web application that uses WebSockets would be a good fit. WebSockets are very low latency which is a must in HFT, right? :)

SuperNintendo Chalmers
Mar 31, 2002

class after class of ugly, ugly children...

Kim Jong III posted:

Aah, I see. If nothing will work off the shelf, it's hard to make a recommendation without knowing more. How significant is the existing codebase? Are we talking 5 KLOC or 500? How broken is it? Does it use any decent practices or is it a morass of spaghetti code and sadness?

If you're in the position to do a rewrite, it sounds like a web application that uses WebSockets would be a good fit. WebSockets are very low latency which is a must in HFT, right? :)

Well thats the thing. The current monitoring tool works. And it works pretty reliably. But as the business changes we need to add more functionality. So in theory we could keep the existing tool and spend the next year porting over to HTML5/JavaScript using Websockets. And I agree, the websockets look like they would work perfectly, so thank you for that!

But the code is messy, to be sure. The guy who wrote it was learning as he went. When he got better he went back to clean up some of the old code, but it's still a hodge-podge of design and flow. (I will say he did a fantastic job of commenting nearly all of his work, which is really the only reason I'm considering learning ActionScript).

I guess I'm trying to reach two goals when deciding between HTML5 vs Flash. A) Creating a tool that the next guy can easily pick up and continue to maintain B) Learning something that will be of use to me for a long time.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Flash/ActionScript isn't too hard to learn, so I'd just say to go with that. I assume that it uses Flex or something similar rather than rolling their own framework. It shouldn't be too bad. Port it to HTML5 when you have a better idea of what the current app does.

Vanadium
Jan 8, 2005

Taking this here from the screenshots-of-your-projects thread.

Suspicious Dish posted:

Vanadium posted:

Now I just need to figure out how to make [a Gtk window] click-throughable. :smith:

Use the X Shape extension and shape the input region away. In C:

code:
cairo_region_t *input_region;
input_region = cairo_region_create ();
gdk_window_input_shape_combine_region (gtk_widget_get_window (widget),
                                       input_region, 0, 0);
cairo_region_destroy (input_region);

I and some dude in the #gtk+ channel found that this only prevents the window from receiving clicks and short of also making that part of the window invisible the clicks won't be passed to windows behind mine.

I know Gtk+ isn't too popular around these parts, but does anyon have any clue how to get a Gtk window to not be invisible but pass clicks through to the window of another process in the background that it covers? I don't even want this to run anywhere but a recent X on linux but doing the xlib stuff myself sounds like a bunch of stuff to learn without even knowing whether it'll get me anywhere.

Edit: Here's my sample that doesn't work. https://gist.github.com/1528915

Edit: My window manager was doing it wrong and I needed gdk_window_set_override_redirect() to tell it to step off. Thanks, Suspicious Dish!

Vanadium fucked around with this message at 22:25 on Dec 28, 2011

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Right, so if you're curious what's happening, it seems that OpenBox reparents windows even if you use the MWM hints to set it undecorated. OpenBox also doesn't copy window shape from the client window to the frame window. Setting it as an OR window prevents it from being reparented.

ghostinmyshell
Sep 17, 2004



I am very particular about biscuits, I'll have you know.
Need some suggestions on where to get into into web services.

I'm tired of work not buying software we need, so I'll do it myself. I did it 10 years ago but that was VB and Access and probably ended up on the dailywtf.com so pretend I'm new here.

My first real projects when I need to apply knowledge is for a role based control system for password management. And a typical inventory system, that use LDAP/AD authentication. Nothing too complex, but the little things like encrypting the passwords or ldap is going to the be the trickier parts.

I want to lean towards an Microsoft solution, but I can't afford visual studio or a windows server license. But I am open to a centos/mysql solution.

Anyone want to recommend some languages, a compiler/IDE and books to get started?

Johnny Cache Hit
Oct 17, 2011

ghostinmyshell posted:

Need some suggestions on where to get into into web services.

I'm tired of work not buying software we need, so I'll do it myself. I did it 10 years ago but that was VB and Access and probably ended up on the dailywtf.com so pretend I'm new here.

My first real projects when I need to apply knowledge is for a role based control system for password management. And a typical inventory system, that use LDAP/AD authentication. Nothing too complex, but the little things like encrypting the passwords or ldap is going to the be the trickier parts.

I want to lean towards an Microsoft solution, but I can't afford visual studio or a windows server license. But I am open to a centos/mysql solution.

Anyone want to recommend some languages, a compiler/IDE and books to get started?

Start by carefully diagramming every component in your system. You might have users who have many roles, and passwords that can be visible by many roles. For your inventory system, maybe you have a name of an item, a count of how many are in stock, a last ordered date, and so forth.

Once you get your components diagrammed, think about the state changes that will need to take place. A widget needs to be removed from stock -- what happens then? What actions should occur when someone changes a password in the management system?

Most importantly, I'd suggest you look for a full featured web framework. Using a framework will make your life tremendously simple and will keep you from making at least some of those tdwtf mistakes.

A good web framework will have a good ORM, which will let you take your components and turn them into models, and your transitions/actions into controllers. You then just write the view in HTML. (This is known as the MVC pattern. The easiest explanation I've found is old, but you should get the idea.)

Deciding on an actual language/framework is less important than you'd think. Personally, I'm a huge fan of Django which is written in Python. Zed Shaw's Learn Python the Hard Way has been mentioned as a really excellent and free way to learn Python with very little programming exposure, but I'm not sure if that's your level. If not, and you're interested in Python, the Python megathread has plenty of resources. I use emacs as my editor but that's :can: that we should avoid. Plenty of people swear by Komodo, so maybe that's good. Try some different editors out.

Good luck :)

Johnny Cache Hit fucked around with this message at 01:28 on Dec 30, 2011

coaxmetal
Oct 21, 2010

I flamed me own dad
I inherited an android project so I'm learning android and I can't figure out a thing. I made a post http://stackoverflow.com/questions/8689929/android-progressdialogue-not-appearing but nobody has answered it yet. If someone with android dev experience thinks they know what's going on with that, let me know.

coaxmetal
Oct 21, 2010

I flamed me own dad
Actually disregard that, I decided i'm going to rebuild it mostly from scratch so it really doesn't matter.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
Anyone know if Winsock has a simple way to determine if a TCP connection was closed from the other end other than trying a peek and seeing if it errors?

Olivil
Jul 15, 2010

Wow I'd like to be as smart as a computer
edit: wrong forum

Olivil fucked around with this message at 07:53 on Jan 3, 2012

Sulla Faex
May 14, 2010

No man ever did me so much good, or enemy so much harm, but I repaid him with ENDLESS SHITPOSTING
In SA-Mart, how come none of the web hosts offer ASP.net support with their basic packages? PHP, python, everything else, yes, and sometimes really weird and elaborate features, but none of them offer a webhost with ASP.net for a cheap package like $10-40/year. Is there a reason for this?

Large Hardon Collider
Nov 28, 2005


PARADOL EX FAN CLUB
I'm trying to get a heatmap overlay on google maps that not only graphically shows density of points, but uses a two-color system to display data contained within those points. Imagine a mashup of this (scroll down for the demo):

http://www.heatmapkit.com/

and something like this:



... so that the red and the blue would flow into one another, and more densely populated areas are darker or more opaque.

Unfortunately, google maps' fusion tables doesn't support this. Does anybody know of a third-party heatmapping API that can do more than plot density of points?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Sulla-Marius 88 posted:

In SA-Mart, how come none of the web hosts offer ASP.net support with their basic packages? PHP, python, everything else, yes, and sometimes really weird and elaborate features, but none of them offer a webhost with ASP.net for a cheap package like $10-40/year. Is there a reason for this?
Because Windows Server licenses are expensive.

baquerd
Jul 2, 2007

by FactsAreUseless

Large Hardon Collider posted:

I'm trying to get a heatmap overlay on google maps that not only graphically shows density of points, but uses a two-color system to display data contained within those points. Imagine a mashup of this (scroll down for the demo):

Why not just consider red = -1, blue = 1 and multiply by population density, then you have your spectrum?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Large Hardon Collider posted:

I'm trying to get a heatmap overlay on google maps that not only graphically shows density of points, but uses a two-color system to display data contained within those points. Imagine a mashup of this (scroll down for the demo):

http://www.heatmapkit.com/

and something like this:



... so that the red and the blue would flow into one another, and more densely populated areas are darker or more opaque.

Unfortunately, google maps' fusion tables doesn't support this. Does anybody know of a third-party heatmapping API that can do more than plot density of points?

Do you know R? Are you willing to learn? Cause that's probably a pretty standard thing for the map facilities they have.

Large Hardon Collider
Nov 28, 2005


PARADOL EX FAN CLUB

baquerd posted:

Why not just consider red = -1, blue = 1 and multiply by population density, then you have your spectrum?
Because then I'd have purple representing not only high-density areas with lots of variation, but also low-density areas. I need a 2D plane of color, with red-blue on one axis and transparent-opaque on the other, like this:



ultrafilter posted:

Do you know R? Are you willing to learn? Cause that's probably a pretty standard thing for the map facilities they have.
I don't. This is for a web app; it needs to take an array of lat/lon coordinates matched with an integer from 1-10 (where 1 is red, 5 is purple, and 10 is blue), and output a google maps overlay like I've described. I might be willing to learn R if you think it would help.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


R's not a web language, so there's some finagling to do, but look here for an example of what some people are using it for.

Edit: I'm not sure that some of the fancier stuff is actually done with R, but the basic stuff shouldn't be a problem.

Large Hardon Collider
Nov 28, 2005


PARADOL EX FAN CLUB
Yeah, I'd really rather not try to learn that. I just can't believe there's nothing with the functionality I'm looking for. I'm considering just generating two heatmaps, one for 'democrats' and one for 'republicans', and overlaying them with low opacity.

If anyone can recommend a heatmap API for google maps that I end up using, I'll paypal you $20 (this isn't breaking a rule, is it?)

not now
Aug 23, 2008

Large Hardon Collider posted:

Yeah, I'd really rather not try to learn that. I just can't believe there's nothing with the functionality I'm looking for. I'm considering just generating two heatmaps, one for 'democrats' and one for 'republicans', and overlaying them with low opacity.

If anyone can recommend a heatmap API for google maps that I end up using, I'll paypal you $20 (this isn't breaking a rule, is it?)

Wouldn't it work by mapping the political spectrum to a color, and the density to an alpha value for that color? If I'm not mistaken that would lead to the density of the little sketch you made.

Large Hardon Collider
Nov 28, 2005


PARADOL EX FAN CLUB

not now posted:

Wouldn't it work by mapping the political spectrum to a color, and the density to an alpha value for that color? If I'm not mistaken that would lead to the density of the little sketch you made.
Yeah, that's exactly what I want, but I don't know how to write that program, at least not in a way that allows for it to be used as a google maps overlay. That's why I want to know if it's already been done.

BigRedDot
Mar 6, 2008

Have you thought about an alternate presentation? Trying to display two different dimensions with a single type of perceptual marker ("retinal variables" ala Bertin) seems like it will necessarily be hard to read. In your image below all low population density cases are essentially indistinguishable across ideology.

For population density you could plot a single circle at each lat/lon, whose size is proportional to population density. Alternatively you could plot a bunch of dodged dots around each lat/lon, the number proportional to population density.

For coloring the dots according to ideology, I'd also recommend a different colormap. A split, discrete colormap, red on one half, blue on the other, where both ends converge to white or grey in the middle seems like it would be alot easer to judge quickly than a continuous colormap with meaningless blend colors in the middle.

I don't know much about google map overlay but you can certainly draw circles of different colors and sizes so it might also be easier.

ZanderZ
Apr 7, 2011

by T. Mascis
How do confrence call servers work? What languages do you need to use in order to set up a conference call server? I've never understood how/why nobody's ever made a smart phone that's capable of hosting a conference call, or does that exist?

Sab669
Sep 24, 2009

I've never done anything this before, but I have some 2,200 files in various folders in an "Agreements" folder. Depending on the type of file (various different types of agreements) I need to rename a file.

An example, any .doc that is an Employment Agreement, I'd like to rename the file from <lastname, firstname>.doc to EA <lastname, firstname>.doc.


But as stated, I'd have 0 idea how to write some sort of script to do this. Hell, I wouldn't even know how to execute it. Can someone point me in the right direction to get started?

Sab669 fucked around with this message at 17:30 on Jan 9, 2012

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

ZanderZ posted:

How do confrence call servers work? What languages do you need to use in order to set up a conference call server? I've never understood how/why nobody's ever made a smart phone that's capable of hosting a conference call, or does that exist?

Are you talking about stuff like ConferenceCall.com where all the people dial a 800 number, then a access code and meeting code?

It's basically a ton of phone lines running into a server, and they are grouped according to the meeting code and then have other attributes like can they talk or just listen, and stuff like that.

A smartphone could probably do it but it'd have to handle say 10 calls coming in at once. Much simpler to do with a phone system and not a single cellular handset.

LP0 ON FIRE
Jan 25, 2006

beep boop
If you have an if statement with more than one condition using a logical AND. When the program is running, and the time has come to check that conditional, if the first condition isn't met, does it ignore the rest? Therefore, you can make a program run faster if you put the most expected comparison to be false first?

i.e.

code:
if(1 == 0 && 0 == 0) { // it's good that I put "1 == 0" first because it never had to do the work of checking "0 == 0"?
 //stuff
}
I'm also sure it depends what language you're running, but in my case it's Objective-C.

Posting Principle
Dec 10, 2011

by Ralp

LP0 ON FIRE posted:

If you have an if statement with more than one condition using a logical AND. When the program is running, and the time has come to check that conditional, if the first condition isn't met, does it ignore the rest? Therefore, you can make a program run faster if you put the most expected comparison to be false first?

i.e.

code:
if(1 == 0 && 0 == 0) { // it's good that I put "1 == 0" first because it never had to do the work of checking "0 == 0"?
 //stuff
}

Some languages ignore the second condition, some don't. It's called short-circuit evaluation.

Here's a non-comprehensive list: http://en.wikipedia.org/wiki/Short-circuit_evaluation#Support_in_common_programming_languages

LP0 ON FIRE
Jan 25, 2006

beep boop

computers posted:

Some languages ignore the second condition, some don't. It's called short-circuit evaluation.

Here's a non-comprehensive list: http://en.wikipedia.org/wiki/Short-circuit_evaluation#Support_in_common_programming_languages

This is awesome, and I'm surprised I haven't thought about this before. I guess it's supported since Objective-C uses C. Thanks!

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Normally if you don't want the short-circuiting behavior you can use bitwise operators instead of && and ||.

LP0 ON FIRE
Jan 25, 2006

beep boop

Internet Janitor posted:

Normally if you don't want the short-circuiting behavior you can use bitwise operators instead of && and ||.

Yeah, I can see how that could be useful if comparison was just a function/method call, and you wanted it to be called no matter what.

Zombywuf
Mar 29, 2008

Internet Janitor posted:

Normally if you don't want the short-circuiting behavior you can use bitwise operators instead of && and ||.

This is a very risky practice. If you really want to get around short circuiting do something like (in C):
code:
// avoid short-circuiting with boolean &&
cond1 = function1();
cond2 = function2();
if (cond1 && cond2) {
  ...

gariig
Dec 31, 2004
Beaten into submission by my fiance
Pillbug

Sab669 posted:

I've never done anything this before, but I have some 2,200 files in various folders in an "Agreements" folder. Depending on the type of file (various different types of agreements) I need to rename a file.

An example, any .doc that is an Employment Agreement, I'd like to rename the file from <lastname, firstname>.doc to EA <lastname, firstname>.doc.


But as stated, I'd have 0 idea how to write some sort of script to do this. Hell, I wouldn't even know how to execute it. Can someone point me in the right direction to get started?
If you are on Windows you could use the built in file search to look for "Kind:Document Employee Agreement" and move those to their own folder. Then use Bulk Rename Utility to add the EA to the front of the name.

Dolemite
Jun 30, 2005
I'm not sure whether to ask this here or in the Cavern of COBOL reading thread. I have a two-fold problem being a newer developer without a computer science background.

First: In writing my first Java / Android app, I believe my design is okay, but I just don't know. I feel that I've created solid classes that make sense in how much of certain responsibilities each one will handle. And how different classes (and objects created from them) will interact with each other. But, I'd like to really read up on software design methods so that I can go back and make things more efficiently designed.

Second: To solve the first problem, I'm not sure what I'm looking for. In my research, there seems to be two kind of tracks: Books/sites talking about software development things like Agile development, etc. Or, things that talk about design principles such as making use of factories, singletons, etc.

Now, I think what I'm looking for is closer to the design pattern type stuff. In reading more about methods like Agile development, it looks like that deals more with how a team will deliver/develop software for a client. But, I'm the only developer on this project and the client just gave us a loose spec. It doesn't really look like books on development methods will benefit me (at this time).

So if I'm looking for readings on design methods, what are good, trusted sites or authors in the industry? In my case, what is less likely to be entirely over my head? Unfortunately, I feel like I'm the most dangerous kind of developer: I can learn a language fairly quickly and have an app written for you in no time. But, I'm noticing that my apps tend to have growing pains until I spend a solid chunk of time rewriting the code to smoothly adopt the new requirement changes.

I REALLY want to avoid my vicious cycle of:

--*FURIOUS TECHNO AND CAFFEINE CODE BINGE*,

--working application,

--"Oh poo poo, I didn't think of these pitfalls",

--*FURIOUS TECHNO AND CAFFEINE CODE BINGE*,

--test app - find bugs,

--"Oh poo poo, to fix it, I need to do X. And in doing so, I should best rewrite these classes Y and Z to work with fixes to X. And now the the classes that Y and Z depend on need to be rewritten...",

--*FURIOUS TECHNO AND CAFFEINE CODE BINGE*

And so on and so forth. :(

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!

Dolemite posted:

In reading more about methods like Agile development, it looks like that deals more with how a team will deliver/develop software for a client. But, I'm the only developer on this project and the client just gave us a loose spec. It doesn't really look like books on development methods will benefit me (at this time).

To address a side issue, while most of that garble won't help you as a solo developer on a small project, one takeaway you might miss is that loose specs are very bad thing. Force your client to be very clear about their requirements or you risk wasting a lot of time over a misunderstanding.

Sorry I don't really have any titles for your main question but some keywords to keep an eye out for are "Design Patterns" and "Object-oriented design".

Adbot
ADBOT LOVES YOU

Sedro
Dec 31, 2008

Dolemite posted:

I'd like to really read up on software design methods so that I can go back and make things more efficiently designed.
Learn the common design patterns and you'll have more tools in your toolbox. They are also common interview questions. But beware: don't use those patterns for the sake of using them. Some are indicative of bad design (ie. singletons). Some of them have don't have any application in Java.

If you really want a book, Design Patterns (GoF) is the bread and butter.

For me, code quality is proportional to how quickly I can read and understand it. Writing code that is clear, well-documented and stateless is worth more than flaunting "design patterns." Good code is simple. If you link some of your code here or in the Java thread, I'm sure you will get some good feedback.

Dolemite posted:

Unfortunately, I feel like I'm the most dangerous kind of developer: I can learn a language fairly quickly and have an app written for you in no time. But, I'm noticing that my apps tend to have growing pains until I spend a solid chunk of time rewriting the code to smoothly adopt the new requirement changes.
You probably won't get past this without a solid amount of experience. Try to identify when you're duplicating code or writing yourself into a corner. Spend more time thinking and less typing.

Also, learn your tools. Practical experience will give you an advantage vs college grads.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply