Saturday, December 7, 2013
Saturday, November 30, 2013
Friday, November 8, 2013
Wednesday, November 6, 2013
Electrocution in Water
http://www.youtube.com/watch?v=dcrY59nGxBg
How Dangerous is it to swim in a pool when there is live wire in the water? What are the chances of electrocution? Take a look and you may get some ideas!
Labels:
Links
Monday, October 7, 2013
Saturday, October 5, 2013
Friday, October 4, 2013
Burritos
https://medium.com/comedy-corner/fd08c0babb57
Jesus already gave me two burrito forks. One at the end of each arm. They’re called fucking HANDS.A fork. My god. I haven’t cried since I was six, but I’m fucking sobbing now.People eat burritos with forks?God is sorry he made us.
Labels:
Links
Friday, September 20, 2013
New Jersey Municipalities
So by popular demand, a post on the types of municipalities in New Jersey.
The structure of NJ Municipalities is rather unique, and complicated. To begin, we must discuss the 5 traditional (ie used before 1900) types, all of which were recently redefined in the late 1980s:
Township is the oldest forms. It began as a direct democracy with a town hall meeting. That system was replaced in the late 1800s and then again in 1989.
Boroughs began as a special form, requiring an act of legislature for each. In the late 1800s any township or area not exceeding 4 square miles and a population of 5000 could form a borough. Boroughs were considered a separate school district and thus could avoid paying taxes as well as exercise greater control over their own schools. This, of course, led to the infamous Borough Fever. The legislature removed the ability for boroughs to self-incorporate. The latest rewrite came in 1987.
Cities were created in the late 1800s by various special laws, with no real pattern, besides a max population cap of 12,000. In the late 1980s when all the municipality laws were rewritten there were only 11 cities.
Towns were created in the late 1800s for municipalities over 5000. The law was rewritten with the rest in the late 1980s.
Villages were also created in the late 1800s for areas of at least 300 people. In the late 1980s rewrite villages were all but abolished (there was only 1 at the time). Now, they operate under the same rules as a township, but with some name changes. For example, mayor is called president of the board, which is a terrible name for the leader of a village, it should probably be chieftain.
Currently, all 5 of these types of municipalities are legally equal. This is opposed to other states, where townships are made up of towns or boroughs.
Now that we've discussed the 5 types of municipalities, we must discuss the 12 forms of government. To begin, each of the 5 types has a default form of the same name. They may either keep the default or change to one of the 7 modern forms.
To begin, there is the special charter, which is another name for 'other'. As in, a special charter granted by the state legislature which doesn't fit one of the other forms.
Next there is the Walsh Act, and the 1923 Municipal Manager Law. Both created in the early 1900s.
The most important of the modern forms, though, are the 4 Faulkner Act forms. The Faulkner Act (aka Optional Municipal Charter Law) was passed in 1950 and created 4 new optional forms: Mayor-Council, Council-Manager, Small Municipality and Mayor-Council-Administrator. Each of these forms have several sub plans, designated by letters (eg plan B).
For some stats I went to this wiki page:
https://en.wikipedia.org/wiki/List_of_municipalities_in_New_Jersey
Unfortunately, it doesn't have most forms, only the types. It also seems to be wrong in a few cases. I used the links to the individual pages, and scraped the form from them directly. Even so, I know there are at least a few errors. For example, there are no more village forms, the last changed a few years ago. My data still lists 1. Still, I hope that it is accurate for a few years ago.
This is a good PDF with a good historical overview:
http://www.njslom.org/history_municipal_govt.pdf
This page gives a good overview of how each form operates:
http://www.njslom.org/types.html
Here's my data:
https://github.com/DaleSwanson/nj-city-wiki/blob/master/nj.csv
The structure of NJ Municipalities is rather unique, and complicated. To begin, we must discuss the 5 traditional (ie used before 1900) types, all of which were recently redefined in the late 1980s:
Township is the oldest forms. It began as a direct democracy with a town hall meeting. That system was replaced in the late 1800s and then again in 1989.
Boroughs began as a special form, requiring an act of legislature for each. In the late 1800s any township or area not exceeding 4 square miles and a population of 5000 could form a borough. Boroughs were considered a separate school district and thus could avoid paying taxes as well as exercise greater control over their own schools. This, of course, led to the infamous Borough Fever. The legislature removed the ability for boroughs to self-incorporate. The latest rewrite came in 1987.
Cities were created in the late 1800s by various special laws, with no real pattern, besides a max population cap of 12,000. In the late 1980s when all the municipality laws were rewritten there were only 11 cities.
Towns were created in the late 1800s for municipalities over 5000. The law was rewritten with the rest in the late 1980s.
Villages were also created in the late 1800s for areas of at least 300 people. In the late 1980s rewrite villages were all but abolished (there was only 1 at the time). Now, they operate under the same rules as a township, but with some name changes. For example, mayor is called president of the board, which is a terrible name for the leader of a village, it should probably be chieftain.
Currently, all 5 of these types of municipalities are legally equal. This is opposed to other states, where townships are made up of towns or boroughs.
Now that we've discussed the 5 types of municipalities, we must discuss the 12 forms of government. To begin, each of the 5 types has a default form of the same name. They may either keep the default or change to one of the 7 modern forms.
To begin, there is the special charter, which is another name for 'other'. As in, a special charter granted by the state legislature which doesn't fit one of the other forms.
Next there is the Walsh Act, and the 1923 Municipal Manager Law. Both created in the early 1900s.
The most important of the modern forms, though, are the 4 Faulkner Act forms. The Faulkner Act (aka Optional Municipal Charter Law) was passed in 1950 and created 4 new optional forms: Mayor-Council, Council-Manager, Small Municipality and Mayor-Council-Administrator. Each of these forms have several sub plans, designated by letters (eg plan B).
For some stats I went to this wiki page:
https://en.wikipedia.org/wiki/List_of_municipalities_in_New_Jersey
Unfortunately, it doesn't have most forms, only the types. It also seems to be wrong in a few cases. I used the links to the individual pages, and scraped the form from them directly. Even so, I know there are at least a few errors. For example, there are no more village forms, the last changed a few years ago. My data still lists 1. Still, I hope that it is accurate for a few years ago.
| Form | Number | Min | Median | Mean | Max |
| All | 565 | 5 | 8,097 | 15,561 | 277,140 |
| Borough | 218 | 296 | 5,776 | 7,167 | 42,704 |
| Township | 141 | 16 | 6,902 | 11,085 | 92,843 |
| Faulkner (all) | 136 | 492 | 23,417 | 32,983 | 277,140 |
| Faulkner Act (Mayor-Council) | 73 | 492 | 30,719 | 45,143 | 277,140 |
| Faulkner Act (Council-Manager) | 43 | 1,170 | 22,866 | 22,929 | 62,300 |
| Walsh Act | 30 | 5 | 4,300 | 12,144 | 66,455 |
| Faulkner Act (Small Municipality) | 17 | 1,673 | 5,357 | 7,327 | 26,535 |
| City | 13 | 1,115 | 8,624 | 14,958 | 64,270 |
| Special Charter | 10 | 8,213 | 24,338 | 29,126 | 66,522 |
| Town | 9 | 2,681 | 13,620 | 14,271 | 40,684 |
| 1923 Municipal Manager Law | 7 | 67 | 24,136 | 28,871 | 84,136 |
| Faulkner Act (Mayor-Council-Administrator) | 3 | 13,183 | 25,850 | 26,592 | 40,742 |
| Village | 1 | 194 | 194 | 194 | 194 |
This is a good PDF with a good historical overview:
http://www.njslom.org/history_municipal_govt.pdf
This page gives a good overview of how each form operates:
http://www.njslom.org/types.html
Here's my data:
https://github.com/DaleSwanson/nj-city-wiki/blob/master/nj.csv
Labels:
Stuff I Wrote
Tuesday, September 17, 2013
High Point Itineraries
A week or so ago I made a post comparing state high point elevations to dates of admission to the union. Todd commented that he wanted to see itineraries for the two different trips. I thought it wouldn't be that hard to make a site to generate the itineraries for any HP trip, and it would be good practice at both Rails and Github. I've done about as much work as I see myself doing on it, so here it is:
http://hp-itinerary.herokuapp.com/create
It should be pretty easy to figure out, but I'll go over the details here.
Probably the biggest negative is that it does not support Alaska and Hawaii. You can't drive to Hawaii, and probably wouldn't to Alaska, so they don't really lend themselves to pregenerated itineraries. I thought about adding some base time like 12 hours for each to represent a flight, but then I needed to account for time to nearest airport, which is pretty significant for some of the HPs.
You enter state abbreviations in the top box, in the order they will be traveled. Use any separator. Click on the dots on the map (red for HPs, green for cities) to add them to the end of the list. Cities are abbreviated with 3 letter airport codes. You can use full names, but only if there are no spaces in the name. There are currently 5 built in trips with buttons to add them to the box. These include two of our trips (NE, SE).
After entering states and cities in order, you can click 'create' to be taken to the itinerary page.
Clear will clear out the box, and reverse will reverse the order of the points in it.
There are some options below the main box, all can be left as their defaults.
Daily start/end time is the time of the day you will begin or stop hiking or driving (use either 24 hour time or 'p' for pm hours). For example if you want your days to start at 4am and end at 9pm, you would enter 4 in the start box, and either 21, 9p, or '9 pm' in the end box. If you enter a start time after the end time it will just swap them.
Driving/Hiking time scale is what to multiply the default data by. The driving times come from Google directions, which I find to be slightly slow, so I might use 0.9 there. The hiking times aren't great, they just assume 2 mph average hiking speed. I compared those times to our hikes and they are reasonably close.
Overhead time is the amount of minutes to add to every hike. Consider this to be the time taken to get out of the car and stop at summit for picture. Somewhat confusingly it will be doubled for most hikes, because it is considered one way.
The display page should also be pretty self-explanatory. It lists the day, with the day count and actual date. The code can handle any starting date, but there is currently no place to enter one other than today, mainly because I didn't feel like parsing dates in javascript. There are two types of task, drive or hike. For each it lists the start and end time (in 24 hour format), the duration (in decimal hours), and distance (miles). There is also a link. For drives it's to Google Directions, and for hikes it's a Google search for the peak and summitpost.org, which should take you directly to the page for most.
Note here that (RT) means round trip, and that is what most hikes will be. The exception will be if the HP is either the starting or ending terminus.
Note that it does seem to handle multi day drives. Although, I'd be careful to double check them.
At the end is total distance and time for the drive and hike. There is no overall Google Directions link because the syntax of the URL was more annoying than I felt like dealing with right now.
You can link directly to the URL given for an itinerary:
http://hp-itinerary.herokuapp.com/display/PHL;CT;RI;MA;NH;ME;VT;NY;NJ;PHL
Some other random notes:
I've deployed this to Heroku. I suppose I should give them credit for free hosting of a dynamic site. However, at least half the development time was spent trying to get it to work. The main issue was their 'toolbelt' they insist you use kept breaking my Rails installation. Then there was the fact that I pretty much had to switch to PostgreSQL for development to make uploading my database work. That being said, once I got it working it was pretty easy to work with.
The code is pretty sloppy overall. Maybe I'll refactor it all one day.
I'd vaguely like to add traveling salesman logic to find the fastest route. I honestly don't think this would be that hard, but isn't likely to happen any time soon.
This is by far the most time I've ever spent for what amounts to a one-off mildly-funny inside joke.
Here's all the code:
https://github.com/DaleSwanson/itinerary
http://hp-itinerary.herokuapp.com/create
It should be pretty easy to figure out, but I'll go over the details here.
Probably the biggest negative is that it does not support Alaska and Hawaii. You can't drive to Hawaii, and probably wouldn't to Alaska, so they don't really lend themselves to pregenerated itineraries. I thought about adding some base time like 12 hours for each to represent a flight, but then I needed to account for time to nearest airport, which is pretty significant for some of the HPs.
You enter state abbreviations in the top box, in the order they will be traveled. Use any separator. Click on the dots on the map (red for HPs, green for cities) to add them to the end of the list. Cities are abbreviated with 3 letter airport codes. You can use full names, but only if there are no spaces in the name. There are currently 5 built in trips with buttons to add them to the box. These include two of our trips (NE, SE).
After entering states and cities in order, you can click 'create' to be taken to the itinerary page.
Clear will clear out the box, and reverse will reverse the order of the points in it.
There are some options below the main box, all can be left as their defaults.
Daily start/end time is the time of the day you will begin or stop hiking or driving (use either 24 hour time or 'p' for pm hours). For example if you want your days to start at 4am and end at 9pm, you would enter 4 in the start box, and either 21, 9p, or '9 pm' in the end box. If you enter a start time after the end time it will just swap them.
Driving/Hiking time scale is what to multiply the default data by. The driving times come from Google directions, which I find to be slightly slow, so I might use 0.9 there. The hiking times aren't great, they just assume 2 mph average hiking speed. I compared those times to our hikes and they are reasonably close.
Overhead time is the amount of minutes to add to every hike. Consider this to be the time taken to get out of the car and stop at summit for picture. Somewhat confusingly it will be doubled for most hikes, because it is considered one way.
The display page should also be pretty self-explanatory. It lists the day, with the day count and actual date. The code can handle any starting date, but there is currently no place to enter one other than today, mainly because I didn't feel like parsing dates in javascript. There are two types of task, drive or hike. For each it lists the start and end time (in 24 hour format), the duration (in decimal hours), and distance (miles). There is also a link. For drives it's to Google Directions, and for hikes it's a Google search for the peak and summitpost.org, which should take you directly to the page for most.
Note here that (RT) means round trip, and that is what most hikes will be. The exception will be if the HP is either the starting or ending terminus.
Note that it does seem to handle multi day drives. Although, I'd be careful to double check them.
At the end is total distance and time for the drive and hike. There is no overall Google Directions link because the syntax of the URL was more annoying than I felt like dealing with right now.
You can link directly to the URL given for an itinerary:
http://hp-itinerary.herokuapp.com/display/PHL;CT;RI;MA;NH;ME;VT;NY;NJ;PHL
Some other random notes:
I've deployed this to Heroku. I suppose I should give them credit for free hosting of a dynamic site. However, at least half the development time was spent trying to get it to work. The main issue was their 'toolbelt' they insist you use kept breaking my Rails installation. Then there was the fact that I pretty much had to switch to PostgreSQL for development to make uploading my database work. That being said, once I got it working it was pretty easy to work with.
The code is pretty sloppy overall. Maybe I'll refactor it all one day.
I'd vaguely like to add traveling salesman logic to find the fastest route. I honestly don't think this would be that hard, but isn't likely to happen any time soon.
This is by far the most time I've ever spent for what amounts to a one-off mildly-funny inside joke.
Here's all the code:
https://github.com/DaleSwanson/itinerary
Labels:
Stuff I Wrote
Subscribe to:
Posts (Atom)