code
30 TopicsIntroducing PASS — Project Aware Smart Scaffolder for ASP.NET Core MVC
Hello .NET Community! I would like to introduce an independent software architecture and research initiative that I have been developing: PASS (Project Aware Smart Scaffolder). The central idea behind this initiative is to explore an important challenge in database-first ASP.NET Core MVC development: How can developers regenerate scaffolded code after database or project changes without losing their existing customizations and business logic? 1. The problem: The scaffolding paradox Microsoft's existing scaffolding capabilities provide an excellent starting point for generating application code. However, in an iterative development environment, developers frequently customize generated models, controllers, views and other application components. When the underlying database schema changes, regenerating these components can introduce conflicts with existing custom implementations. Developers may consequently need to: Manually reconcile generated and customized code. Reapply previously implemented business logic. Maintain additional conventions and project-specific configurations. Avoid regeneration because of the potential impact on existing work. This creates an interesting architectural challenge: How can scaffolding remain useful throughout the entire application lifecycle rather than primarily during initial code generation? 2. The proposed approach: PASS PASS explores a deterministic, database-aware, project-aware and non-destructive scaffolding architecture intended to complement Microsoft's existing scaffolding capabilities rather than replace them. Its proposed architectural concepts include: Persistent project configuration — pass.json A centralized configuration file intended to preserve project-specific conventions, generation preferences and architectural decisions. Roslyn-based syntax-tree analysis and merging Exploring C# Abstract Syntax Trees (ASTs) to identify structural changes and reconcile generated code while preserving compatible custom implementations. Project awareness Considering existing project structure, naming conventions, architectural decisions and dependencies when generating or updating code. Database awareness Using database schema changes as inputs for identifying required code-generation updates. Non-destructive regeneration The overall objective is to reduce unnecessary overwriting of developer-maintained code during subsequent scaffolding operations. 3. Current research status PASS is currently in its Research & RFC (Request for Comments) phase. The repository contains architectural and research documentation, including: Research Proposal Methodology & Evaluation Plan System Architecture Roslyn Merging Strategy RFC-0001: Community Discussion The project is not being presented as a completed or production-ready implementation. The current priority is to validate the architectural assumptions, identify technical limitations and obtain feedback before proceeding with implementation. Project repository and research documentation: https://github.com/RashedulHaqueRonjon/PASS-Framework/ 4. Topics where I would particularly appreciate community feedback I would welcome perspectives from experienced C#, ASP.NET Core MVC, Entity Framework Core and Roslyn developers on the following architectural questions: What would be the most reliable strategy for distinguishing generated code from developer-maintained custom code? Which Roslyn syntax-tree analysis and merging approaches would be appropriate for safely reconciling existing C# files? How should the architecture handle conflicting changes between database-generated properties and manually maintained model implementations? What safeguards should be considered before automatically applying changes to existing project files? Would a persistent project configuration file such as pass.json be an effective way to preserve project-specific scaffolding conventions? What testing and evaluation criteria would you recommend before considering such a framework technically reliable? 5. An invitation to the .NET community I believe that improving the sustainability of code generation is a worthwhile area of exploration for the ASP.NET Core ecosystem. I would particularly appreciate constructive architectural criticism, alternative approaches, technical recommendations and suggestions for improving the research methodology. This is an independent research initiative, and the objective at this stage is to learn from the experience of the .NET community. Thank you for your time and consideration. Rashedul Haque Ronjon Independent Researcher30Views0likes3CommentsPair Programming and test-driven development with Visual Studio Live Share and GitHub Copilot
Pair programming and TDD are valuable software development techniques that can enhance the development process, and GitHub Copilot can help teams effectively utilize these practices to produce high-quality code.8KViews1like1CommentPython in Excel – Available Now
Python in Excel is now generally available for Windows users of Microsoft 365 Business and Enterprise. Last August, in partnership with Anaconda, we introduced an exciting new addition to Excel by integrating Python, making it possible to seamlessly combine Python and Excel analytics within the same workbook, no setup required. Since then, we’ve brought the power of popular Python analytics libraries such as pandas, Matplotlib, and NLTK to countless Excel users.130KViews5likes26CommentsCreación de pruebas con GitHub Copilot para Visual Studio
[Blog original escrito en inglés por Laurent Bugnion y Bruno Capuano] En nuestra industria, es común que nosotros los programadores enfrentemos diferentes desafíos como: documentar código y crear pruebas unitarias. GitHub Copilot puede ser de gran ayuda en estas áreas, facilitando y mejorando estos procesos. Los comandos de barra (slash), "hechizos mágicos" para Visual Studio Estos pueden aparecer escribiendo la barra diagonal '/' (slash command) en el chat de GitHub Copilot en Visual Studio. Luego, se abrirá un menú donde puede seleccionar un comando, por ejemplo, /fix para arreglar algún código, o /optimize. También tenemos /doc que, como su nombre indica, te ayudara a crear documentación para el código seleccionado, por ejemplo, un método o una propiedad. El último comando que se muestra en el screenshot anterior es /tests. Este es especialmente útil para ayudarle a empezar a trabajar con las pruebas unitarias para el código actual en contexto. En el video corto (en inglés) que publicó Laurent, Bruno Capuano muestra cómo GitHub Copilot puede proponer pruebas unitarias para toda una clase. Para hacer eso, Bruno comienza escribiendo /tests en la ventana de chat de Copilot, y luego escribe un hash '#' que abrirá otro menú contextual para seleccionar el contexto. La importancia del contexto Para los modelos de LLM, el contexto es crucial para la correcta ejecución de las solicitudes. El contexto se ingresa en el prompt junto con la entrada del usuario, lo que se conoce como metaprompts. En otras palabras, cualquier información que ayude al LLM a generar resultados más precisos es útil. En GitHub Copilot para Visual Studio, el contexto puede ser: el código seleccionado, otro archivo de programación o incluso toda la solución. Estas opciones se pueden seleccionar desde el ‘hash context menú”, como se muestra aquí: Creando las pruebas Una vez que se ejecute este comando, el chat de Copilot propondrá una sugerencia de cómo podrían ser las pruebas. Ten en cuenta que, al igual que con todas las demás características de GitHub Copilot, esto está destinado a ayudarte a ti, el programador a cargo, y no solo a hacer el trabajo por ti. El código creado debe ser verificado y aprobado por ti, y probado exhaustivamente para asegurarte de que realmente hace lo que esperaba (sí, vas a probar las pruebas unitarias). GitHub Copilot te ayuda al hacer más rápido el proceso y más eficiente, pero no está reemplazando tu función de verificar el código. La diferencia aquí, en comparación con las características anteriores que mostramos, es que GitHub Copilot propone crear las pruebas en un nuevo archivo. Esto es lo que normalmente hacemos para las pruebas unitarias, con clases y métodos dedicados. Asimismo, esto está disponible aquí con el botón Insertar en un nuevo archivo. Una vez creado el nuevo archivo, debes guardarlo en la solución. De hecho, es probable que desees organizar las pruebas en una biblioteca de clases independiente en la misma solución. Más información Laurent y Bruno han recolectado una lista de recursos aquí y esperamos que esta información sea útil para que empieces y mejores tus habilidades en Visual Studio. También puedes ver un video relacionado de 13 minutos aquí, y ver otros videos de la serie aquí. Mantente atento a más contenido suscribiéndote a este blog y al canal de YouTube de Visual Studio.197Views0likes0CommentsAnnouncing GitHub Universe Cloud Skills Challenge!
Join the GitHub Universe Cloud Skills Challenge and start your exiting journey in AI! Whether you’re beginning or looking to change your career, this learning experience is designed to introduce you to some of the most requested GitHub tools for AI beginners, and to explore new opportunities. Join the GitHub Universe Cloud Skills Challenge and start your exciting journey in AI!41KViews13likes25CommentsGitHub Foundations Certification Study Guide
Get ready for the GitHub Foundations certification. With its widespread adoption across various industries, the demand for individuals with proven mastery of GitHub's capabilities has never been higher, as collaboration, project management, and code versioning skills are a necessity.84KViews17likes27CommentsHow to count and sum "Condtional formatting" cells by color in Excel 2010?
I installed few add-ins for counting "Conditional formatted" cells but all are generating an instant (one-time) numeric result by activating that command. Also, I tried a code which gives an instant counting of 1 picked color without a total sum of all other colors -in my case 12 colors in a matrix. ("How to use the code to count colored cells and sum their values" - https://www.ablebits.com/office-addins-blog/2013/12/12/count-sum-by-color-excel/ ) My question is: Is there any functional code (or other aproach) which can count and sum all cells by "Conditional formatted" colors, on one sheet, and that the generated result is linked through common formulas? That can be updated/refreshed/code run during the work process as a complete overview of colors of a matrix (and not by picking every color every time as I mentioned). Thanks in advance!Solved296KViews1like181Comments