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.
 
  • Locked thread
NOTinuyasha
Oct 17, 2006

 
The Great Twist
finally, a thread for me

Adbot
ADBOT LOVES YOU

NOTinuyasha
Oct 17, 2006

 
The Great Twist

dur posted:

i'm a bad programmer. this is how i'm making an xml file in python

Python code:
fcline = '\t<FeatureClass name=\"%s\" oid_field=\"ObjectID\">\n'
fline = '\t\t<Feature oid=\"%s\" action=\"added\" />\n'

outFile.write(fcline % 'MISC_PLAN_METRICS')
for row in arcpy.SearchCursor('MISC_PLAN_METRICS_Work'):
	outFile.write(fline % row.ObjectID)
outFile.write('\t</FeatureClass>\n')
	
outFile.write(fcline % 'Park_Boundaries')
for row in arcpy.SearchCursor('Park_Boundaries_Work'):
	outFile.write(fline % row.ObjectID)
outFile.write('\t</FeatureClass>\n')

outFile.write(fcline % 'Hydrology')
for row in arcpy.SearchCursor('Hydrology_Work'):
	outFile.write(fline % row.ObjectID)
outFile.write('\t</FeatureClass>\n')
it works though

what you actually are is a really really bad programmer, im a regular bad programmer and it only took me like five minutes to figure out lxml

NOTinuyasha
Oct 17, 2006

 
The Great Twist
i had to generate something with a custom namespace once and i just used a template engine because it would have required actually reading the documentation to do it in lxml, but that one case was acceptable because i checked on github and found a real programmer who did it too.

NOTinuyasha
Oct 17, 2006

 
The Great Twist

Papes posted:

So I'm a terrible programmer whose only done academia stuff so I have little knowledge about how "real" programs work.

I'm trying to put together a very simple shipment notification app for the iPhone. I've dug through the APIs of the major parcel carriers and I believe I just need to make a XML parser class (I'd use a library one obviously) and then receive and send messages to their respective websites through the XML parser?

Is this basically the gist of what I should do, or is there a way thats 10x easier that I don't know about.

would you say the time & money you spent learning "academia stuff" was worth it at all

NOTinuyasha
Oct 17, 2006

 
The Great Twist

polpotpi posted:

theres no good tutorials or books for objective c

big nerd ranch makes a good objective-c book

Adbot
ADBOT LOVES YOU

NOTinuyasha
Oct 17, 2006

 
The Great Twist

Mido posted:

use singletons everywhere


everywhere

Do this

  • Locked thread