Development by Davis

Headlines

Mostrando entradas con la etiqueta Windows. Mostrar todas las entradas
Mostrando entradas con la etiqueta Windows. Mostrar todas las entradas

martes, 14 de febrero de 2012

Development by Davis: “Five and a half couples who shared love and work the open source way” plus 1 more


Development by Davis: “Five and a half couples who shared love and work the open source way” plus 1 more



Posted: 13 Feb 2012 09:00 PM PST
Five and a half couples who shared love and work the open source way
It's Valentine's Day, which is about love and relationships, and successful relationships are always based on the same principles that make open source projects successful--transparency, sharing, and generally working together for something better than either could have alone. Here are five couples who were not only partners in love, but in their work that also reflected the open source way.
read more


Posted: 13 Feb 2012 07:34 AM PST
Open Advice logo
A new book sharing the perspectives of 42 open source contributors launched this month at FOSDEM. Open Advice, edited by Lydia Pintscher, shares what those successful people wish they'd known when they got started with open source software.
In the foreword, Georg Greve, founding president of the Free Software Foundation Europe, explains why such a book is important, even to those barely aware of free and open source software:
read more


Enhanced by Zemanta

Colección de rendimiento del contador

Colección de rendimiento del contador:
Como mencioné en mi "Hola, mundo" post , los contadores de rendimiento son una gran herramienta de diagnóstico para el inicio de las investigaciones de rendimiento. Registro de contadores de rendimiento en las carreras no agregar una sobrecarga tanto, a diferencia de los perfiladores. Sin embargo, esto no es un sustituto de perfiladores que son necesarias para investigaciones en profundidad. Las siguientes son algunas herramientas que puede utilizar para recoger los contadores de rendimiento.

Monitor de rendimiento
Windows viene con el monitor de rendimiento de herramientas, o Monitor de rendimiento, para abreviar. Esta interfaz gráfica de usuario le permite ver datos en tiempo real de contadores de rendimiento de la máquina ya sea local o en sistemas remotos. Basta con ejecutar `` Monitor de rendimiento y vaya a Herramientas-> Rendimiento-> Control de Monitor de rendimiento. Haga clic para agregar o quitar contadores. Presione la tecla 'Ctrl + G "para cambiar el tipo de gráfico. Ver informe es útil cuando se monitorea varios contadores.
Perfecto y Logman
Perfecto es un conjunto de recopiladores de datos que se conecta al monitor de rendimiento, y fue creado por José Reyes . Esta es una manera rápida y sencilla para recoger ASP.NET, IIS, CLR y los contadores del sistema que dan una buena visión general del rendimiento de ASP.NET.
Logman es una herramienta de línea de comandos para la gestión de conjuntos de recopiladores de datos de Monitor de rendimiento.
Intente lo siguiente:
  1. Descargar Perfecto , descomprimirlo y ejecutar el script de configuración
  2. Ejecute `logman start-n" servicio \ ASPNET Perfecto "`
  3. Hacer una solicitud web pocos a localhost
  4. Ejecute `logman stop-n" servicio \ ASPNET Perfecto "`
  5. Ver el informe en "% SystemDrive% \ PerfLogs \ Admin \ ASPNET Perfecto \ 000001 \ report.html"
No tenga miedo de personalizar Perfecto a sus necesidades: agregar contadores de rendimiento, cambie el directorio de informes, etc Haga clic en 'ASPNET Perfecto' para editar las propiedades en el Monitor de rendimiento. Haga clic de nuevo y guarde la plantilla ... para crear una versión actualizada de Perfecto.DataCollectorSet.xml.
Typeperf y TList
Para las colecciones básicas de contador, puede utilizar el Typeperf de línea de comandos. Se puede combinar con la TList comando con el fin de recoger los contadores que son específicos para un proceso dado. Por ejemplo, puede obtener el tiempo de procesador para todos los procesos mediante la ejecución de:
`Para / t" tokens = 2 = delims. "% A in ('tlist') hacen typeperf-sc 1" del proceso (% a) Procesador \% de tiempo "
WCAT
WCAT también es compatible con la colección de contadores de rendimiento. Esta es nuestra principal forma de recogida de contadores de rendimiento ya que la mayoría de nuestros escenarios utilizar WCAT. Echa un vistazo a nuestro archivo settings.ubr para ver los contadores que seguir:
 ajustes
{
  contadores
  {
      intervalo de = 10;

      contador = ". NET CLR (w3wp) \ \ Número de excepciones iniciadas por segundo";
      contador = ". NET CLR JIT (w3wp) \ \% de tiempo en el Jit";
      contador = ". NET CLR JIT (w3wp) \ \ Bytes IL Jitted / s";
      contador = ". NET CLR carga (w3wp) \ \% tiempo de carga";
      contador = ". NET CLR carga (w3wp) \ \ AppDomain actual";
      contador = ". NET CLR carga (w3wp) \ \ Asambleas actual";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ # de los actuales temas lógicos";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ # Temas actuales de la física";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ # de los actuales temas reconocidos";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ # del total de temas reconocidos";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ Longitud de la cola / s";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ # total de contenciones";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ tasa de contención / s";
      contador = ". NET CLR LocksAndThreads (w3wp) \ \ Longitud actual de la cola";
      contador = "NET CLR (w3wp) \ \% de tiempo en el CG.";
      contador = ". NET CLR (w3wp) \ \ Número de bytes en todos los montones";
      contador = "NET CLR (w3wp) \ \ # 0 Gen colecciones".;
      contador = "NET CLR (w3wp) \ \ # Gen 1 Colecciones.";
      contador = "NET CLR (w3wp) \ \ # Gen 2 colecciones.";
      contador = ". NET CLR (w3wp) \ \ # inducida por GC";
      contador = "NET CLR (w3wp) \ \ asignado Bytes por segundo.";
      contador = ". NET CLR (w3wp) \ \ Los sobrevivientes de acabado";
      contador = ". NET CLR (w3wp) \ \ 0 Gen tamaño de la pila";
      contador = ". NET CLR (w3wp) \ \ Gn 1 pila de tamaño";
      contador = ". NET CLR (w3wp) \ \ Gen 2 tamaño de la pila";
      contador = ". NET CLR (w3wp) \ \ objetos de gran tamaño del montón";
      contador = ". NET CLR (w3wp) \ \ objetos de gran tamaño del montón";
      contador = ". NET CLR (w3wp) \ \ # de objetos anclados";
      contador = ". NET CLR Seguridad (w3wp) \ \% de tiempo en los controles de RT";
      contador = ". NET CLR Seguridad (w3wp) \ \ Stack Depth Walk";
      contador = "NET CLR Seguridad (w3wp) \ \ Los controles de tiempo de ejecución total.";
      contador = "aplicaciones ASP.NET (__Total__) \ \ entradas de caché Total";
      contador = "aplicaciones ASP.NET (__Total__) \ \ Relación de aciertos de caché Total";
      contador = "aplicaciones ASP.NET (__Total__) \ \ Tasa de caché de volumen de negocios total";
      contador = "aplicaciones ASP.NET (__Total__) \ \ entradas de caché de salida";
      contador = "aplicaciones ASP.NET (__Total__) \ \ aciertos de caché de salida";
      contador = "aplicaciones ASP.NET (__Total__) \ \ Cache Hit Ratio de salida";
      contador = "aplicaciones ASP.NET (__Total__) \ \ caché de resultados de índice de rotación";
      contador = "aplicaciones ASP.NET (__Total__) \ \ Recopilaciones Total";
      contador = "aplicaciones ASP.NET (__Total__) \ \ Total de errores / s";
      = "contador de aplicaciones ASP.NET (__Total__) \ \ Conde de instancias de canalización";
      contador = "aplicaciones ASP.NET (__Total__) \ \ Las solicitudes de ejecución";
      contador = "aplicaciones ASP.NET (__Total__) \ \ solicitudes en cola de la aplicación";
      contador = "aplicaciones ASP.NET (__Total__) \ \ Solicitudes por segundo";
      contador = "ASP.NET \ \ Reinicia aplicación";
      contador = "ASP.NET \ \ Solicitud de tiempo de espera";
      contador = "ASP.NET \ \ Pide actual";
      contador = "ASP.NET \ \ Solicitudes en cola";
      contador = "ASP.NET \ \ Las solicitudes rechazadas";
      contador = "Memoria \ \ MBytes disponibles";
      contador = "Memoria \ \ Fallos de caché / seg";
      contador = "Memoria \ \ Demanda Cero Errores / seg";
      contador = "Memoria \ \ Página Fallos / seg";
      contador = "Memoria \ \ Páginas / s";
      contador = "Memoria \ \ Errores de transición / seg";
      contador = "Memoria \ \ Bytes de bloque no paginado";
      contador = "Memoria \ \ Bytes de bloque paginado";
      contador = "DiscoFísico (Total) \ Tiempo \% del disco";
      contador = "DiscoFísico (Total) \ \% Tiempo de lectura de disco";
      contador = "DiscoFísico (Total) \ \% tiempo de escritura del disco";
      contador = "Proceso (w3wp) \ Procesador \% Tiempo";
      contador = "Proceso (w3wp) \ \ Mango Conde";
      contador = "Proceso (w3wp) \ \ ID del proceso";
      contador = "Proceso (w3wp) \ \ Bytes privados";
      contador = "Proceso (w3wp) \ \ Número de subprocesos";
      contador = "Proceso (w3wp) \ \ Bytes virtuales";
      contador = "Proceso (w3wp) \ \ Conjunto de trabajo";
      contador = "Procesador (_Total) \ Tiempo \% de interrupción";
      contador = "Procesador (_Total) \ Tiempo \% privilegiada";
      contador = "Procesador (_Total) \ Tiempo \% Processor";
      contador = "Procesador (_Total) \ Tiempo \% usuario";
      contador = "\ System \ Cambios de contexto por segundo";
      contador = "\ System \ llamadas al sistema por segundo";
      contador = "Servicio Web (Total) \ \ recibimos solicitudes por segundo";
      contador = "Servicio Web (Total) \ \ peticiones POST / seg";
      contador = "Servicio Web (Total) \ \ Los intentos de conexión por segundo";
      contador = "Web Service (_Total) \ \ Conexiones actuales";
      contador = "Servicio Web (Total) \ \ Las solicitudes de extensión ISAPI por segundo";
      contador = "Caché de Web Service \ \ URI caché Hits%";
      contador = "Caché de Web Service \ \ Kernel: Cache URI Hits%";
      contador = "Caché de Web Service \ Cache \ Archivo Hits%";
  }
} 

PAL
Análisis de rendimiento de los registros (PAL) es una herramienta de Microsoft por el ingeniero de campo principal, Clint Huffman . No he tenido la oportunidad de ver esta herramienta, sin embargo, por lo que no quiero especular. Parece tener un potente conjunto de características y los siguientes, por lo que definitivamente vale la pena un vistazo si usted necesita una visión más completa.

Enhanced by Zemanta

viernes, 10 de febrero de 2012

Development by Davis: “Debunking The Oatmeal and the perception of Linux as difficult to use” plus 3 more


Development by Davis: “Debunking The Oatmeal and the perception of Linux as difficult to use” plus 3 more



Posted: 10 Feb 2012 04:00 AM PST
Oatmeal and laptop
The Oatmeal made a webcomic that's been reformatted and recently passed around Facebook and other social media. It's titled "How To Fix Any Computer" and pokes fun at Windows, Apple, and Linux each in its own way. And although I love The Oatmeal, this comic's screed on Linux promotes a myth that needs to be dispelled. The "How to fix Linux" instructions begin:
read more


Posted: 10 Feb 2012 02:00 AM PST
Two reasons I love blogging: Helping out great communities
Non profits and governments...this is how open source works: If someone is doing something that is of value to you, help make it better.
There have been two great examples of this type of behaviour on my blog over the past week.
read more


Posted: 09 Feb 2012 10:20 AM PST
The first FOSDEM Legal Issues DevRoom
For FOSDEM 2012, held last weekend in Brussels, I had the privilege of co-organizing (with Tom Marble, Karen Sandler, and Bradley Kuhn) the first-ever DevRoom track devoted to discussion of legal issues relating to free/libre/open source software. With several thousand attendees and hundreds of sessions, FOSDEM is one of the largest FLOSS conferences in the world, and surely the largest in Europe. This makes it all the more remarkable that FOSDEM is a free-admission, non-commercial community event, organized and administered entirely by volunteers.
The idea of a Legal DevRoom being untested, FOSDEM's organizers gave us a single day and a relatively small room. Our basic goal was to
read more


Posted: 09 Feb 2012 08:06 AM PST

[This post is by Alexander Lucas, an Android Developer Advocate bent on saving the world 5 minutes. —Tim Bray]
[Please join the discussion on Google+.]
Intents are awesome. They are my favorite feature of Android development. They make all sorts of stuff easier. Want to scan a barcode? In the olden platforms, if you were lucky, this involved time and effort finding and comparing barcode-scanning libraries that handled as much as possible of camera interaction, image processing, an internal database of barcode formats, and UI cues to the user of what was going on. If you weren't lucky, it was a few months of research & haphazard coding to figure out how to do that yourself.
On Android, it's a declaration to the system that you would like to scan a barcode.
public void scanSomething() {     // I need things done!  Do I have any volunteers?     Intent intent = new Intent("com.google.zxing.client.android.SCAN");      // This flag clears the called app from the activity stack, so users arrive in the expected     // place next time this application is restarted.     intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);      intent.putExtra("SCAN_MODE", "QR_CODE_MODE");     startActivityForResult(intent, 0); } ... public void onActivityResult(int requestCode, int resultCode, Intent intent) {     if (requestCode == 0) {         if (resultCode == RESULT_OK) {             //  The Intents Fairy has delivered us some data!             String contents = intent.getStringExtra("SCAN_RESULT");             String format = intent.getStringExtra("SCAN_RESULT_FORMAT");             // Handle successful scan         } else if (resultCode == RESULT_CANCELED) {             // Handle cancel         }     } }
See that? That's nothing. That's 5 minutes of coding, 3 of which were just to look up the name of the result you wanted to pull. And that was made possible because the Barcode Scanner application is designed to be able to scan barcodes for whatever other applications may need it.
More important, our app is completely decoupled from the BarcodeScanner app. There's no integration- in fact, neither application is checking to verify that the other exists. If the user preferred, they could remove "Barcode Scanner" and replace it with a competing app. As long as that app supported the same intent, functionality would remain the same. This decoupling is important. It's the easy way. It's the lazy way. It's the Android way.

Sharing Data Using Intents

One of the most inherently useful Android intents is the Share intent. You can let the user share data to any service they want, without writing the sharing code yourself, simply by creating a share intent.
Intent intent=new Intent(android.content.Intent.ACTION_SEND); intent.setType("text/plain"); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);  // Add data to the intent, the receiving app will decide what to do with it. intent.putExtra(Intent.EXTRA_SUBJECT, "Some Subject Line"); intent.putExtra(Intent.EXTRA_TEXT, "Body of the message, woot!");
... and starting it with a chooser:
startActivity(Intent.createChooser(intent, "How do you want to share?"));
With these 5 lines of code, you get to bypass authenticating, credential storage/management, web API interaction via http posts, all sorts of things. Where by "bypass", I mean "have something else take care of." Like the barcode scanning intent, all you really had to do was declare that you have something you'd like to share, and let the user choose from a list of takers. You're not limited to sending text, either. Here's how you'd create an intent to share an image:
private Intent createShareIntent() {     ...     Intent shareIntent = new Intent(Intent.ACTION_SEND);     shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);     shareIntent.setType("image/*");      // For a file in shared storage.  For data in private storage, use a ContentProvider.     Uri uri = Uri.fromFile(getFileStreamPath(pathToImage));     shareIntent.putExtra(Intent.EXTRA_STREAM, uri);     return shareIntent; }  
Note that just by using setType() to set a MIME type, you've filtered down the list of apps to those that will know what to do with an image file.

Intents over Integration

Think about this for a second. By making the simple assumption that any user of any service (Task Manager, Social Network, Photo sharing site) already has some app on their phone that can share to that service, you can leverage the code that they've already written. This has several awesome implications:
  • Less UI — You don't have to clog up your UI with customized, clickable badges of services you support. Just add a "share" button. It's okay, we've made sure all your users know what it does [insert smiley here].
  • Leveraged UI — You can bet that every high-quality web service out there has spent serious time on the UI of their Android app's "share" activity. Don't reinvent the wheel! Just grab a couple and go for a ride.
  • Filtered for the user — If I don't have a Foo-posting app on my phone, there's a good chance I don't care about posting to Foo. Now I won't see Foo icons everywhere that are useless to me.
  • Client App Ecosystem — Much like an email client, anyone can write a client for any service. Users will use the ones they want, uninstall the ones they don't. Your app supports them all.
  • Forward Compatible with new services — If some swanky new service springs up out of nowhere with an Android Application, as long as that application knows how to receive the share intent, you already support it. You don't spend time in meetings discussing whether or not to wedge support for the new service into your impending Next Release(tm), you don't burn engineering resources on implementing support as fast as possible, you don't even upload a new version of anything to Android Market. Above all, you don't do any of that again next week, when another new service launches and the whole process threatens to repeat itself. You just hang back and let your users download an application that makes yours even more useful.

Avoid One-Off Integrations

For each pro of the Intent approach, integrating support to post to these services one-at-a-time has a corresponding con.
  • Bad for UI — If your photo-sharing app has a Foo icon, what you might not immediately understand is that while you're trying to tell the user "We post to Foo!" what you're really saying is "We don't post to Bar, Baz, or let you send the photo over email, sms, or bluetooth. If we did, there would be icons. In fact, we probably axed those features because of the space the icons would take on our home screen. Oh, and we'll probably use some weird custom UI and make you authenticate through a browser, instead of the Foo client you already have installed." I'm not going to name names, but a lot of you are guilty of this. It's time to stop. (I mean it. Stop.)
  • Potentially wasted effort — Let's say you chose one service, and integrated it into your UI perfectly. Through weeks of back-and-forth with Foo's staff, you've got the API and authentication mechanisms down pat, the flow is seamless, everything's great. Only problem is that you just wasted all that effort, because none of your user-base particularly cares for Foo. Ouch!
  • Not forward compatible for existing services — Any breaking changes in the API are your responsibility to fix, quickly, and that fix won't be active until your users download a newer version of your app.
  • Won't detect new services — This one really hurts. If a brand new service Baz comes out, and you've actually got the engineering cycles to burn, you need to get the SDK, work out the bugs, develop a sharing UI, have an artist draw up your own "edgy" (ugh) but legally distinct version of the app's logo so you can plaster it on your home screen, work out all the bugs, and launch.
You will be judged harshly by your users. And deservedly so.

Ice Cream Sandwich makes it even easier

With the release of ICS, a useful tool for sharing called ShareActionProvider was added to the framework, making the sharing of data across Android applications even easier. ShareActionProviders let you populate lists of custom views representing ACTION_SEND targets, facilitating (for instance) adding a "share" menu to the ActionBar, and connecting it to whatever data the user might want to send.
Doing so is pretty easy. Configure the menu items in your Activity's onCreateOptionsMenu method, like so:
@Override public boolean onCreateOptionsMenu(Menu menu) {     // Get the menu item.     MenuItem menuItem = menu.findItem(R.id.menu_share);     // Get the provider and hold onto it to set/change the share intent.     mShareActionProvider = (ShareActionProvider) menuItem.getActionProvider();      // Attach an intent to this ShareActionProvider.  You can update this at any time,     // like when the user selects a new piece of data they might like to share.     mShareActionProvider.setShareIntent(yourCreateShareIntentMethod());      // This line chooses a custom shared history xml file. Omit the line if using     // the default share history file is desired.     mShareActionProvider.setShareHistoryFileName("custom_share_history.xml");       . . . }
Note that you can specify a history file, which will adapt the ordering of share targets based on past user choices. One shared history file can be used throughout an application, or different history files can be used within the same application, if you want to use a separate history based on what kind of data the user wants to share. In the above example, a custom history file is used. If you wish to use the default history for the application, you can omit that line entirely.
This will help optimize for an important feature of the ShareActionProvider: The user's most common ways to share float to the top of the drop-down, with the least used ones disappearing below the fold of the "See More" button. The most commonly selected app will even become a shortcut right next to the dropdown, for easy one-click access!

You'll also need to define a custom menu item in XML. Here's an example from the ActionBar Dev Guide.
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android">     <item android:id="@+id/menu_share"           android:title="@string/share"           android:showAsAction="ifRoom"           android:actionProviderClass="android.widget.ShareActionProvider" /> </menu>
And with that, you can have an easy sharing dropdown that will look like the screenshot here. Note that you get the nice standard three-dots-two-lines "Share" glyph for free.

Remember: Smart and Easy

The share intent is the preferred method of sharing throughout the Android ecosystem. It's how you share images from Gallery, links from the browser, and apps from Android Market. Intents are the easiest path to writing flexible applications that can participate in a rapidly expanding ecosystem, but they're also the smart path to writing applications that will stay relevant to your users, letting them share their data to any service they want, no matter how often their preferences change over time. So take a step back and stop worrying about if your user wants to tweet, digg, post, email, im, mms, bluetooth, NFC, foo, bar or baz something. Just remember that they want to share it. Android can take it from there.



Enhanced by Zemanta