Question for developers:
Is it reasonable for me to rely on my developers to identify technology change risks (ex. iOS 7-8 transition), or should that be on the business team to identify and prioritize?
Honest question.
Developers should know and business should ask.
Specifics depend a lot on the company and what developers are charged with.
That being said, the transition from 7 to 8 is quite mild. Most of the painful iOS transition stuff has to do with apps made on 5 and 6 transitioning to 7-8
Is it harder though? I dunno, first thing I do is work on an admin interface to simplify that stuff. In a place like iOS where memory is at a premium, seems like you'd not want to cache in an entire set of things. I guess you could get around that by having tons of files. Then you get into the position where you don't want tons of files so you find a way to package them...
And then we're back at square one.
But yeah, json seems like it'd be just fine!
You are a true programmer.
Step 1 to making a game: lets write an admin interface to add elements to a flat file db.
Pfft, I wrote a filesystem
Do tell me more, that does sound fun.
Well, we needed a way to access lots of resource files - models, textures, shaders, configuration, etc, and we had level editing built right into the game, so we needed to potentially save a bunch of files with the levels and so needed some way to pack them, not just the baked assets file to be shipped
The classic choice is a store-only zip file, used by things like Quake 3. Another choice is Blizzard's MPQ (which they finally dropped for something more like what I built actually!). The problem with those is they are static, if you change something you have to re-write the entire file to disk. You can see this with older WoW updates, where they download the update and then have to write the entire massive merged file to disk
So, I wrote a filesystem. Extents-based with inodes, noting special really, and since it was designed to be file-based, only 8kB of metadata (4 for the superblock and 4 for the root freelist) and insufficient space writes would try to extend the file
And then I tied it in with the rest of the I/O system. To load a map that was on someone else's machine, we "opened" a file that routed requests to the target machine and copied it locally. But because it was just another file, we could run the level setup at the same time and the requests (cached locally) would be mixed in. I/O requests would be split across extents as needed, I'd made sure the entire I/O backend was asynchronous anyway
You should throw that shit up on github, bro.
Didn't think anyone would be interested. I'll see if I can find it
Those are the front end and back end for the raid/group finding tool I'm building us for Destiny. The front end is an AngularJS SPA which runs a simple Express server that simply hosts the index.html, main.css and main.js (which are the entire application after compilation). The back end is a HapiJS JSON API which uses Boom to signal errors (so status codes + standardized JSON packet with error message).
If you've ever wondered what it really looks like when you're entire stack is written in JavaScript, have a peek. It's not perfect code, and I still need to write most of my tests, but it's mostly clean and there is a lot of plumbing you won't see in most basic projects.
e: I forgot to point out the back end data store is MongoDB using Mongoose for data access.
I had a text file but the export engine was giving me garbled data in it for some fields. The text file was fine when it was ~1-2 gigs worth of data because I didn't read the whole thing in.
I'm using c#, and I need to read roughly the same amount of data via XML, which actually has the real data in it this time instead of garbled (XML is the only one that works from a foxpro export for some reason with the memo fields he has).
Can I just use the in built XML stuff and set it and forget it or is there anything I need to consider because of their large size?
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
0
KakodaimonosCode fondlerHelping the 1% get richerRegistered Userregular
As long as you can process the elements sequentially and you don't need the DOM, use XmlReader. That will work fine on a large XML file.
Don't get me started on SAP. I could build a better software suite in Excel.
Which is hyperbole and I shouldn't get too specific but I deal with some of their products as a business analyst with an extensive technology background and they nearly gave me an aneurism multiple times.
Switch: SW-7690-2320-9238Steam/PSN/Xbox: Drezdar
+1
GnomeTankWhat the what?Portland, OregonRegistered Userregular
I have, and yes, you use XmlReader for that. We actually ended up writing a fragment reader which can search and find a fragment of XML using XmlReader, then return that fragment as a constituted DOM object (Linq to XML in our case, so XElement) for more robust searching. Basically the idea is you never want to constitute more of the document than you need to. The other nice thing about using an XmlReader is that it's stream agnostic, allowing you to stream very large documents from disk or over the network.
Don't get me started on SAP. I could build a better software suite in Excel.
Which is hyperbole and I shouldn't get too specific but I deal with some of their products as a business analyst with an extensive technology background and they nearly gave me an aneurism multiple times.
First time I watched an ABAP developer load up their built-in code editor, with no syntax highlighting, no auto-complete, no intellisense, and no easy access to documentation, in 2010, I almost fainted. Ignoring completely that the language is basically a showcase of The Worst of Cobol.
I mean, I appreciate that I can drag and drop fields from a category view into the thing and it will handle figuring out how to join shit from the 1300+ tables so I don't have to, but why is it impossible to do any kind of aggregate function on the query side instead of the report side.
+1
gavindelThe reason all your softwareis brokenRegistered Userregular
I'm building a subset of a data mining engine for our class project. Naturally, that means the need for efficient joins to handle the massive files involved. Wrestle with Python a little, learn some about the finer details of Pythonian I/O, but its going well. Until I notice that my sort-merge join is reporting that userID 80 has 300 job apps out, and user 9934 has over ten thousand!
I check the logic on my merge for the two sorted files:
#set up the while loop up here
if ID1 == ID2:
result.write(line1 + '\t' + line2)
file1.next()
file2.next()
elif ID1 < ID2:
file2.next()
elif ID1 > ID2:
file1.next()
#loop ends
I can't find any errors in the join. Its as efficient as I'm going to get when I have to do reads by the line. Tear out some of my ever-receding hair, gnash teeth, and finally start tracing individual comparisons. Everything works fine for the first users, but as we get higher up the issue becomes more common...Wait a second.
>>>"80" > "520"
True
Sonnova. String comparison instead of integer! I'd forgotten that many languages do their string comparison one char at a time.
I may be a senior, but you can never graduate your own bouts of blind stupidity.
Angels, innovations, and the hubris of tiny things: my book now free on Royal Road! Seraphim
Embarrassing story for the day that I don't mind sharing.
Was trying to figure out why my for loop wasn't getting called. I thought it was that filterArray wasn't actually an array but rather a String (I'm dealing with just Objects... Don't ask). So multiple deployments, a dozen lines of debug statements, and a year or so off my life I actually looked at the code I was dealing with:
for(var i:int = 0; i > filterArray.length; i++){
Yeah. Sometimes I am not a smart man. But hopefully I'll check that FIRST next time.
That's something I totally would pass over 20 dozen times and end up throwing debug statements into my code (if I didn't have a debugger) to find out what the fuck is going on with the loop.
Then after wasting 5 hours, sigh loudly and walk away and stab someone.
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
That's something I totally would pass over 20 dozen times and end up throwing debug statements into my code (if I didn't have a debugger) to find out what the fuck is going on with the loop.
Then after wasting 5 hours, sigh loudly and walk away and stab someone.
That's exactly what happened and exactly how I feel.
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
+3
admanbunionize your workplaceSeattle, WARegistered Userregular
edited October 2014
I probably write one for/while loop for every 10-20 foreachs.
That said, the last while loop I wrote was just a few days ago, because SharePoint's JavaScript library implements getEnumerator, moveNext, and get_current (you read that right) on its collections, but doesn't implement .forEach.
I probably write one for/while loop for every 10-20 foreachs.
That said, the last while loop I wrote was just a few days ago, because SharePoint's JavaScript library implements getEnumerator, moveNext, and get_current (you read that right) on its collections, but doesn't implement .forEach.
Because SharePoint.
I avoid the SharePoint JS libraries as much as I can. I'm a back-end programmer at heart, but god damn if they seem to be pushing the "web dev" side of things lately.
I am going to have to buckle down and start using the REST api instead of the CSOM for my apps eventually, but they'll have to drag me kicking and screaming. I avoid Javascript and use server-side when I can.
Let's say I have a remote called Remote, and a branch called Branch. I've branched locally so that there is a local Branch and also a Remote/Branch, and I am currently checked out to my local Branch, though that should probably be irrelevant.
I want to force pull Remote/Branch, set it immediately to the state of the remote repo, regardless of the current state of my branch. I THOUGHT that the way to do this was:
I wish I could go beat anyone that used a setsockopt() call in our application code with a newspaper.
A 35KB buffer will be enough forever! Never mind that it fits 2 whole jumbo frame packets, you didn't know that was a thing when you wrote the code 20 years ago. Just let the OS do it! We have 8MB of memory just hanging out, waiting to be used for this stuff!
0
GnomeTankWhat the what?Portland, OregonRegistered Userregular
I have to do so much old browser JavaScript at work that I end up writing a lot of for loops (as Array.forEach is only standard in modern-ish browsers).
Let's say I have a remote called Remote, and a branch called Branch. I've branched locally so that there is a local Branch and also a Remote/Branch, and I am currently checked out to my local Branch, though that should probably be irrelevant.
I want to force pull Remote/Branch, set it immediately to the state of the remote repo, regardless of the current state of my branch. I THOUGHT that the way to do this was:
Let's say I have a remote called Remote, and a branch called Branch. I've branched locally so that there is a local Branch and also a Remote/Branch, and I am currently checked out to my local Branch, though that should probably be irrelevant.
I want to force pull Remote/Branch, set it immediately to the state of the remote repo, regardless of the current state of my branch. I THOUGHT that the way to do this was:
...because it was fine for me to obliterate my local Branch since this was my initial pull.
That being said, your line:
git reset --hard Remote/Branch
...was giving me issues. (I was already checked out to Branch when I ran the fetch and reset commands, and my reset command looks to me like it's identical to yours) In the interest of knowing this for the future, any clue why that might have been?
[EDIT] Is it because the fetch line was fetch Remote/Branch instead of fetch Remote?
Rend on
0
admanbunionize your workplaceSeattle, WARegistered Userregular
I probably write one for/while loop for every 10-20 foreachs.
That said, the last while loop I wrote was just a few days ago, because SharePoint's JavaScript library implements getEnumerator, moveNext, and get_current (you read that right) on its collections, but doesn't implement .forEach.
Because SharePoint.
I avoid the SharePoint JS libraries as much as I can. I'm a back-end programmer at heart, but god damn if they seem to be pushing the "web dev" side of things lately.
I am going to have to buckle down and start using the REST api instead of the CSOM for my apps eventually, but they'll have to drag me kicking and screaming. I avoid Javascript and use server-side when I can.
I really like JS, in general. Maybe it's because my original back-end background (backbackback) is in Ruby rather then C#, but I tend to feel like I'm smart enough not to hang myself so I prefer that languages give me all the rope I need.
i never go so far as to declare some critical component of a computer system as "broken" when my code fails
but, I do declare things as "fucked up wizard shit going on"
todays wizard shit was I had two different sets of JSON data somehow getting merged together into one permanent soufflé of data and I had no idea how. and when you see a variable that appears to be sourced straight from a file and you open that file and see it definitely doesn't contain the data the browser is reporting, you need someone to blame
after brief head-scratching i remember that I wrote a routine that merges the two data sets, but it was supposed to be a temporary merge and a bug was causing it to be permanent
I probably write one for/while loop for every 10-20 foreachs.
That said, the last while loop I wrote was just a few days ago, because SharePoint's JavaScript library implements getEnumerator, moveNext, and get_current (you read that right) on its collections, but doesn't implement .forEach.
Because SharePoint.
I avoid the SharePoint JS libraries as much as I can. I'm a back-end programmer at heart, but god damn if they seem to be pushing the "web dev" side of things lately.
I am going to have to buckle down and start using the REST api instead of the CSOM for my apps eventually, but they'll have to drag me kicking and screaming. I avoid Javascript and use server-side when I can.
I really like JS, in general. Maybe it's because my original back-end background (backbackback) is in Ruby rather then C#, but I tend to feel like I'm smart enough not to hang myself so I prefer that languages give me all the rope I need.
But the SP JS library is just godawful.
A good compiler is like a good dominatrix.
I need it to yell at me and tell me I'm a bad programmer.
Steam: Spawnbroker
+3
GnomeTankWhat the what?Portland, OregonRegistered Userregular
edited October 2014
That's what tools like jshint/jslint are for. They yell at me and tell me when I'm doing stupid shit, like using undeclared variables, or falling in to parse traps.
Other files just don't work and incorrectly redirect to index.php.
I have no goddamn idea what is going on. My .htaccess is pretty simple:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
Posts
Developers should know and business should ask.
Specifics depend a lot on the company and what developers are charged with.
That being said, the transition from 7 to 8 is quite mild. Most of the painful iOS transition stuff has to do with apps made on 5 and 6 transitioning to 7-8
Didn't think anyone would be interested. I'll see if I can find it
("12:00".."12:15").cover?("12:14") # => trueOf course, it doesn't care about time, so this is also true:
("11:59".."12:00").cover?("11:99")that is.. extremely handy
https://github.com/brainling/parf
https://github.com/brainling/parf-api
Those are the front end and back end for the raid/group finding tool I'm building us for Destiny. The front end is an AngularJS SPA which runs a simple Express server that simply hosts the index.html, main.css and main.js (which are the entire application after compilation). The back end is a HapiJS JSON API which uses Boom to signal errors (so status codes + standardized JSON packet with error message).
If you've ever wondered what it really looks like when you're entire stack is written in JavaScript, have a peek. It's not perfect code, and I still need to write most of my tests, but it's mostly clean and there is a lot of plumbing you won't see in most basic projects.
e: I forgot to point out the back end data store is MongoDB using Mongoose for data access.
Yeah, just include the Comparable module and implement the spaceship.
Mmm, Ruby. 8->
I had a text file but the export engine was giving me garbled data in it for some fields. The text file was fine when it was ~1-2 gigs worth of data because I didn't read the whole thing in.
I'm using c#, and I need to read roughly the same amount of data via XML, which actually has the real data in it this time instead of garbled (XML is the only one that works from a foxpro export for some reason with the memo fields he has).
Can I just use the in built XML stuff and set it and forget it or is there anything I need to consider because of their large size?
Which is hyperbole and I shouldn't get too specific but I deal with some of their products as a business analyst with an extensive technology background and they nearly gave me an aneurism multiple times.
First time I watched an ABAP developer load up their built-in code editor, with no syntax highlighting, no auto-complete, no intellisense, and no easy access to documentation, in 2010, I almost fainted. Ignoring completely that the language is basically a showcase of The Worst of Cobol.
I check the logic on my merge for the two sorted files:
I can't find any errors in the join. Its as efficient as I'm going to get when I have to do reads by the line. Tear out some of my ever-receding hair, gnash teeth, and finally start tracing individual comparisons. Everything works fine for the first users, but as we get higher up the issue becomes more common...Wait a second.
Sonnova. String comparison instead of integer! I'd forgotten that many languages do their string comparison one char at a time.
I may be a senior, but you can never graduate your own bouts of blind stupidity.
I am incredibly upset I can't use this in all the miserable embedded vb app crap I have to deal with
so slick
All of ruby is slick. Almost all of it anyway.
Was trying to figure out why my for loop wasn't getting called. I thought it was that filterArray wasn't actually an array but rather a String (I'm dealing with just Objects... Don't ask). So multiple deployments, a dozen lines of debug statements, and a year or so off my life I actually looked at the code I was dealing with:
for(var i:int = 0; i > filterArray.length; i++){Yeah. Sometimes I am not a smart man. But hopefully I'll check that FIRST next time.
Then after wasting 5 hours, sigh loudly and walk away and stab someone.
That's exactly what happened and exactly how I feel.
And since I've been plugging ruby so much: ruby doesn't even have for loops for you to mix up your signs in.
That said, the last while loop I wrote was just a few days ago, because SharePoint's JavaScript library implements getEnumerator, moveNext, and get_current (you read that right) on its collections, but doesn't implement .forEach.
Because SharePoint.
I avoid the SharePoint JS libraries as much as I can. I'm a back-end programmer at heart, but god damn if they seem to be pushing the "web dev" side of things lately.
I am going to have to buckle down and start using the REST api instead of the CSOM for my apps eventually, but they'll have to drag me kicking and screaming. I avoid Javascript and use server-side when I can.
Let's say I have a remote called Remote, and a branch called Branch. I've branched locally so that there is a local Branch and also a Remote/Branch, and I am currently checked out to my local Branch, though that should probably be irrelevant.
I want to force pull Remote/Branch, set it immediately to the state of the remote repo, regardless of the current state of my branch. I THOUGHT that the way to do this was:
git fetch Remote/Branch
git reset --hard Remote/Branch
...but after the second command I get: fatal: ambiguous argument 'Remote/Branch': unknown revision or path not in working tree.
Am I doing something silly?
A 35KB buffer will be enough forever! Never mind that it fits 2 whole jumbo frame packets, you didn't know that was a thing when you wrote the code 20 years ago. Just let the OS do it! We have 8MB of memory just hanging out, waiting to be used for this stuff!
The following should work.
I think the following should also work
It turns out this is what I needed: ...because it was fine for me to obliterate my local Branch since this was my initial pull.
That being said, your line: ...was giving me issues. (I was already checked out to Branch when I ran the fetch and reset commands, and my reset command looks to me like it's identical to yours) In the interest of knowing this for the future, any clue why that might have been?
[EDIT] Is it because the fetch line was fetch Remote/Branch instead of fetch Remote?
I really like JS, in general. Maybe it's because my original back-end background (backbackback) is in Ruby rather then C#, but I tend to feel like I'm smart enough not to hang myself so I prefer that languages give me all the rope I need.
But the SP JS library is just godawful.
i never go so far as to declare some critical component of a computer system as "broken" when my code fails
but, I do declare things as "fucked up wizard shit going on"
todays wizard shit was I had two different sets of JSON data somehow getting merged together into one permanent soufflé of data and I had no idea how. and when you see a variable that appears to be sourced straight from a file and you open that file and see it definitely doesn't contain the data the browser is reporting, you need someone to blame
after brief head-scratching i remember that I wrote a routine that merges the two data sets, but it was supposed to be a temporary merge and a bug was causing it to be permanent
wizard shit resolved
A good compiler is like a good dominatrix.
I need it to yell at me and tell me I'm a bad programmer.
I redirect to index.php/$1 for files that don't exist.
http://foo.com/composer.json shows the JSON file that happens to be lying around for whatever reason.
Other files just don't work and incorrectly redirect to index.php.
I have no goddamn idea what is going on. My .htaccess is pretty simple:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs to index.php/URL RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 index.php </IfModule>RewriteCond needs to be broken out of once it runs into it, doesn't it? It's always going to process that RewriteRule I think?