投稿時間:2023-08-21 18:20:34 RSSフィード2023-08-21 18:00 分まとめ(28件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… ThreadsのWeb版、今週公開へ https://taisy0.com/2023/08/21/175583.html thewallstreetjournal 2023-08-21 08:39:52
IT InfoQ NuGet 6.7 Announced With Enhanced Security Features https://www.infoq.com/news/2023/08/nuget-6-7/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global NuGet Announced With Enhanced Security FeaturesThe NuGet team announced NuGet an update that introduces a set of advanced security features These enhancements span from updated package source mapping to the integration of vulnerability APIs updated package version dropdowns and the addition of warning messages to tackle trust chain issues By Almir Vuk 2023-08-21 08:45:00
IT 情報システムリーダーのためのIT情報専門サイト IT Leaders SBテクノロジー、クラウドのセキュリティリスクを検出する「クラウドパトロール」を提供 | IT Leaders https://it.impress.co.jp/articles/-/25250 SBテクノロジー、クラウドのセキュリティリスクを検出する「クラウドパトロール」を提供ITLeadersSBテクノロジーSBTは年月日、クラウド監視サービス「クラウドパトロール」を提供開始した。 2023-08-21 17:12:00
AWS AWS Japan Blog AWS Hybrid Cloud & Edge Day に参加して、どこにでもあるクラウドにアプリケーションをデプロイする方法を学習 https://aws.amazon.com/jp/blogs/news/join-aws-hybrid-cloud-edge-day-to-learn-how-to-deploy-your-applications-in-the-everywhere-cloud/ awshybridcloudampedgeday 2023-08-21 08:12:59
python Pythonタグが付けられた新着投稿 - Qiita AHC022: 二次元格子上に整数をできるだけ滑らかに配置する https://qiita.com/jkdorayaki/items/3f7d581b70c7881c7a5f atcoderheuristiccontest 2023-08-21 17:48:35
python Pythonタグが付けられた新着投稿 - Qiita python実行環境にインストールされているpipパッケージを一覧表示する https://qiita.com/dokeita/items/0cb4031b43fe0b2ed344 表示 2023-08-21 17:21:16
python Pythonタグが付けられた新着投稿 - Qiita 【tradingview】テクニカルインジケーターの使い方と設定方法 https://qiita.com/gk12/items/9d21cbcb0e5bf23a0e6c tradingview 2023-08-21 17:05:45
python Pythonタグが付けられた新着投稿 - Qiita 【tradingview】チャート分析ツールの活用方法 https://qiita.com/gk12/items/272edf7f0bd7aa1143b9 tradingview 2023-08-21 17:04:05
js JavaScriptタグが付けられた新着投稿 - Qiita エンジニアとしての優秀さとアプリの面白さは関係するのか? https://qiita.com/monsoonTropicalBird/items/348f51b4eba44c06f8f2 超絶技巧 2023-08-21 17:52:13
Ruby Railsタグが付けられた新着投稿 - Qiita Rails 6から7への移行で躓いたところ https://qiita.com/koizumistr/items/369cbc9a0d93dadd21a9 rails 2023-08-21 17:37:24
技術ブログ Developers.IO CX事業本部に対し、課題整理支援&可視化支援を実施しました https://dev.classmethod.jp/articles/in-house-case-of-bi-support/ 課題 2023-08-21 08:04:32
技術ブログ Developers.IO AWS Transfer Familyが FTPS + VPC(インターネット向け)の構成で、VPC内のEC2インスタンスからファイル転送してみた https://dev.classmethod.jp/articles/transfer-family-ec2-access-in-private-subnet/ transferfami 2023-08-21 08:03:17
海外TECH DEV Community A Deep Dive into componentDidMount and useEffect in React https://dev.to/basskibo/a-deep-dive-into-componentdidmount-and-useeffect-in-react-4n05 A Deep Dive into componentDidMount and useEffect in React IntroductionIt s been a long time since last post I have many new posts ready in draft but let s start with one simple posts which I hope clarify a lot As a React developer you may have come across the terms componentDidMount and useEffect when working with lifecycle methods and hooks I mean it is almost impossible to make a React application and not encounter one of those two Although they both serve similar purposes they are not interchangeable and have some key differences In this blog post we ll take a closer look at each method and when to use them in your React projects componentDidMountcomponentDidMount is a lifecycle method that is called after a component has been rendered to the DOM It s commonly used to perform any setup or initialization tasks that need to happen after the component has been rendered For example you might use componentDidMount to fetch data from an API set up a subscription or add event listeners class ExampleComponent extends React Component componentDidMount perform setup tasks here render component render logic here One of the key benefits of using componentDidMount is that it guarantees that the component has been rendered before the code inside the method is executed This can be useful if you need to access the DOM or if you want to be sure that the component is fully rendered before you perform any logic componentDidMount is used in Class components useEffectuseEffect is a hook that allows you to synchronize a component with an external system It s similar to componentDidMount componentDidUpdate and componentWillUnmount combined It allows you to add logic that is executed after the component is rendered and also allows you to clean up that logic when the component is unmounted function ExampleComponent useEffect gt perform setup tasks here return gt clean up tasks here component render logic here The first argument passed to useEffect is a function containing the logic to be executed after the component is rendered The second argument is an array of dependencies which are values that the effect depends on If any of the dependencies change the effect will be re executed One of the key benefits of using useEffect is that it allows you to synchronize a component with external systems in a more declarative and efficient way than using lifecycle methods This can make your code easier to understand test and reuse useEffect hook is equivalent of componentDidMount in functional components When to use whichAs a general rule of thumb if you re working with class components and you need to perform setup or cleanup tasks that are related to the component s lifecycle you should use componentDidMount If you re working with functional components and you need to synchronize the component with an external system you should use useEffect In practice you ll often find that you can use either method to accomplish the same task The key is to understand the trade offs between the two and choose the one that makes the most sense for your specific use case ConclusioncomponentDidMount and useEffect are both powerful tools that can help you manage the lifecycle of your React components Understanding the differences between them and when to use them will help you write more maintainable efficient and organized code So now you know what is the main difference between these two and how and when to use them Follow the guidelines and you will reach full potential of your React application 2023-08-21 08:35:20
海外TECH DEV Community First Code Crush: Which Language Feels Like Home? https://dev.to/codenewbieteam/first-code-crush-which-language-feels-like-home-577f First Code Crush Which Language Feels Like Home We all have that one language that just clicks Which language are you naturally drawn to for your projects Share your stories and what makes it your comfort go to Follow the CodeNewbie Org and codenewbie for more discussions and online camaraderie CodeNewbie Follow The most supportive community of programmers and people learning to code Part of the DEV family 2023-08-21 08:28:13
海外TECH DEV Community Tech Upgrades: When to Make the Jump? https://dev.to/devteam/tech-upgrades-when-to-make-the-jump-37gm Tech Upgrades When to Make the Jump Switching to newer tech in coding can be a gamble How do you choose Tell us about a project you upgraded amp what drove the change Follow the DEVteam for more discussions and online camaraderie The DEV Team Follow The team behind this very platform 2023-08-21 08:21:02
海外TECH DEV Community Explicit Design, Part 6. Cross-Cutting Concerns and Extendable Infrastructure https://dev.to/bespoyasov/explicit-design-part-6-cross-cutting-concerns-and-extendable-infrastructure-4hoh Explicit Design Part Cross Cutting Concerns and Extendable InfrastructureIn the previous posts we composed a basic version of the application that handled the main use cases In this post we will discuss functionality that is related to business logic indirectly infrastructure expansion analytics alert monitoring logging and so on But first disclaimer This is not a recommendation on how to write or not write code I am not aiming to “show the correct way of coding because everything depends on the specific project and its goals My goal in this series is to try to apply the principles from various books in a fairly over engineered frontend application to understand where the scope of their applicability ends how useful they are and whether they pay off You can read more about my motivation in the introduction Take the code examples in this series sceptically not as a direct development guide but as a source of ideas that may be useful to you By the way all the source code for this series is available on GitHub Give these repo a star if you like the series Types of Code and DensityIn applications in addition to business logic code there is also “supporting code that is not directly related to the domain It can be “glue that connects different parts of the application and third party tools together or “non primary functionality that is indirectly needed by the business such as analytics or monitoring Usually the more complex the application the lower the proportion of business logic and the more supporting code it has We can call this relationship the density the more supporting code the lower the logic density Business rules in it are as if “diluted by various auxiliary things The main danger of low density is that the logic can “dissolve and “get lost in the supporting glue However business logic and “glue change for different reasons and with different speeds so ideally they should be clearly separated and not interfere with each other s work On the other hand supporting code is often difficult to place and encapsulate in any one part of the application because its functionality is used by multiple other modules To work conveniently with such code we can try to divide it into a “service part that does not depend on the domain and an “adapter part that will contain knowledge specific to our application In this post we will look at how achievable this is and what limitations may arise along the way Logging and AnalyticsLet s say that the product owners want to conduct a UX experiment and for that we need to collect data on how users interact with the application We need to integrate an analytics service that would register actions on the screen In our case the third party analytics service will be this code services analyticsexport const sendEvent SendEvent async event payload gt const dateTime new Date toISOString const eventData payload Additional data payload const message Analytics dateTime Captured event “ event eventData console log message That implements the SendEvent type shared kerneltype SendEvent event string payload string gt Promise lt void gt We don t really care about how events are registered at the moment so we re just outputting them to the console At this point there could be a request to some service like Google Analytics Firebase or another Let s say we want to link the call to this service with for example a click on the “Refresh Rates button The simplest way to do this is to put the service in the use case dependencies and call it core refreshRatestype Dependencies fetchRates FetchRates readConverter ReadConverter saveConverter SaveConverter New dependency sendAnalytics SendEvent export const createRefreshRates fetchRates readConverter saveConverter Dependencies RefreshRates gt async gt Sending the analytics event sendAnalytics CLICKED CONVERTER BUTTON OR WHATEVER The rest of the code This is a working solution but it has a problem The use case didn t know anything about analytics and wasn t dependent on this service so analytics actually has nothing to do with the use case Analytics is important for the business but it is not a part of the domain model We can conclude that it is “cross cutting code and we shouldn t mix it directly with the use case function We can improve the situation by using decorators Composition in DecoratorsA decorator is a function that enriches another function with some additional functionality In our case decorators will “attach different “additional calls like analytics to user cases Let s create a function withAnalytics which will expect the RefreshRates use case as input infrastructure analyticsexport const withAnalytics Accept RefreshRates as an argument return RefreshRates as the result refresh RefreshRates RefreshRates gt async gt Calling the service sendEvent CLICKED CONVERTER BUTTON OR WHATEVER Calling the real use case and returning its result return await refresh Note that the result of the decorator s work is a new function that implements the same type as the decorator argument Thus the decorator enriches the use case but does not change its public interface This means that to compose this decorator together with the use case we only need to wrap the use case function with it core refreshRates compositionexport const refreshRates RefreshRates withAnalytics createRefreshRates fetchRates readConverter saveConverter This allows us to easily compose multiple decorators together enriching the use case with “additional functionality without modifying its code The type of the withAnalytics function can be made generic to work with different use cases if necessary Benefits of DecoratorsDecorators encapsulate all the knowledge about how to work with the analytics specific to a particular feature The name of the event the order of the call and the data that needs to be passed along with the callーall of this is located in one place and not scattered throughout the codebase Mixing or removing a specific part of functionality with decorators becomes easier because we only need to add or remove a specific function without digging into the source code of the use case itself And the unchanged interface of the use case itself helps to conveniently compose calls In general the idea of decorator composition is not new If you have worked with OOP code you are probably familiar with validating or logging decorators Here we use the same idea but in the form of a function rather than a class Limitations of DecoratorsIf it s important for us to run analytics in the middle of a use case or depending on certain conditions a decorator may not be suitable In such cases it is generally not too bad to insert a service call into the logic code but by default it is worth considering whether this can be avoided In addition a call such as for analytics may require data from other restricted contexts How to solve this depends on the specific project conditions but you can look towards extracting a Shared Kernel a common context or decoupled communication between features We will talk more about the latter in detail in the next two posts Alert MonitoringIn addition to the main error handling mechanisms it can also be useful to track specific errors in certain use cases This can be conveniently done with decorators too Let s create the withAlertMonitor decorator specify the dangerous function as an argument and return a function wrapped in try catch that implements the same interface shared error handlingconst withAlertMonitor workflow T T gt gt try Try to invoke a dangerous operation return workflow catch error If there s an error we re interested in send it to the alert monitoring service if error instanceof DomainError captureError error Finally re throw the error up so that the main error handling mechanism could handle it and say tell the user about it throw error Decorators can also be used for error handling itself not just monitoring It all depends on the project requirements and how the handling is implemented The need to rethrow the error will of course depend on how the error handling is made in our project too In this example we assume that we handle errors at the top level and in decorators we only report them to the monitoring service We could use such a decorator like this core refreshRates compositionimport withAlertMonitor from shared error handling export const refreshRates RefreshRates withAlertMonitor createRefreshRates Performance ProfilingAnother scenario for using decorators is performance profiling For example to measure how long it takes for a use case to execute we could write a function like this infrastructure performanceimport type RefreshRates from core ports input export const withPerfMeasure fn RefreshRates RefreshRates gt async gt const start performance now await fn const end performance now console log RefreshRates took end start ms And then wrap in it the function we re interested in import withBenchmark from infrastructure performance export const refreshRates RefreshRates withBenchmark createRefreshRates The profiling decorator can also be generic so that it s convenient to use it with different functions PersistenceMost of the state management libraries usually provide tools for saving data to the device s local storage For example Zustand has a separate package for persistence However sometimes such tools may not exist or they may not be customizable enough In such cases we can write data saving ourselves For example first let s describe the data saving “service shared kerneltype Persist lt T gt key PersistenceKey value T gt void type Retrieve lt T gt key PersistenceKey gt Nullable lt T gt services persistenceexport const persist Persist key value gt window localStorage setItem key JSON stringify value export const retrieve Retrieve key gt const value window localStorage getItem key return value JSON parse value null Next we ll describe a decorator that will wrap the SaveConverter output port infrastructure persistenceconst key converter app rates export const withPersistence fn SaveConverter SaveConverter gt converter gt persist key converter rates return fn converter Then we ll be able to compose persistence with the service infrastructure store compositionimport withPersistence from persistence const saveConverter withPersistence converter setState Composition of Multiple DecoratorsAs we mentioned earlier decorators preserve the type of the function they enhance with new functionality This means that one use case can be wrapped in multiple decorators at once export const refreshRates RefreshRates withAlertMonitor withAnalytics withBenchmark createRefreshRates fetchRates readConverter saveConverter For aesthetics you can use functional utilities like pipe or compose to make the chain look a bit flatter export const refreshRates RefreshRates pipe Decorators in order of applying them withBenchmark withAnalytics withAlertMonitor Use case “baking createRefreshRates fetchRates readConverter saveConverter This way the separation of logic and “additional functionality will be expressed directly in the code and adding or removing a new decorator will only involve changing the list inside pipe Switching Tools and Extending InfrastructureIn addition to using decorators this method of composition creates a “buffer zone between different modules of the app allowing for updating or expanding the infrastructure if needed We have already touched on this topic in the previous post when discussing replacing the state manager now let s look at other options API ClientFor example if we need to replace fetch with axios it will be enough to implement the ApiRequest lt T gt type services networkimport axios from axios export const get url Url gt axios request config url then response gt response data catch cause gt throw new Error Failed to perform request cause Since the public API of the module hasn t changed the composition of this service and interaction with other layers of the application will remain the same as it was LocalizationLocalization is a bit more complex topic It can be either simply part of the UI or somehow intertwined with the use case logic it depends on the project In our converter we can isolate localization at the UI layer level so it will be sufficient to update the components type Localize key string gt LocalizedString type BaseValueInputDeps updateBaseValue UpdateBaseValue useBaseValue SelectBaseValue Declare the localizer as a dependency useLocales Provider lt Localize gt export function BaseValueInput updateBaseValue useBaseValue useLocales BaseValueInputDeps Use it inside the component const l useLocales return lt label gt lt span gt l BaseValueInput Label lt span gt lt label gt Then we ll update composition passing the localization service ui BaseValueInput composition import useLocales from shared ui localization export const BaseValueInput gt Component updateBaseValue useBaseValue useLocales Again as we discussed in one of the previous posts the “explicit composition might not be necessary If so we can import the service directly export function BaseValueInput Import the localizer and use it directly const l useLocales return lt label gt lt span gt l BaseValueInput Label lt span gt lt label gt In the latter case for testing purposes a localization provider may be required if we use a library that depends on the context Caching and DeduplicationIf we need to deduplicate or cache server requests we can extend the tooling by adding a library for that Most network libraries currently use hooks so we will use them in the example too By the way I think that useSWR and React Query take on too much They go too deep into the multiple application layers making themselves no longer “non opinionated and in some cases using them becomes inconvenient There are libraries that implement the SWR standard and do not use hooks but there are not many of them We already have an infrastructure hook that turns an asynchronous use case into a “command result for the UI Let s extend it and add useSWR there shared cqs swrtype RequestId List lt Unique lt string gt gt Adding a request ID by which we will deduplicate requests and cache the results export const asCommand lt F extends AsyncFn gt command F requestId RequestId Provider lt Command lt F gt gt gt gt const run setRun useState false const data error isLoading useSWR run requestId null command Under the hood we call useSWR I don t really like how they recommend to “defer the call with null in their docs but whatever const execute gt setRun true as F const status Status isLoading pending error failure idle const result is status data error We adapt the result of the useSWR call to the required interface so that all components relying on asCommand continue to work as before return execute result Since we have added a new argument to asCommand we need to add this argument to the composition of components that use it ui RefreshRates compositionexport const RefreshRates gt Component useRefreshRates asCommand refreshRates refresh The rest will remain unchanged There s a weird quirk though with this implementation we have to pass to useSWR not only the network request function but the whole use case It seems “not quite right because useSWR is specifically a tool for working with the network On the other hand we would still have to restart the use case after updating the data so I decided that it was “good enough But again it s not a “tutorial for writing production code but just an idea of splitting composition of different functionality It might not fit real project code because of its “non standardness Next TimeIn this post we discussed cross cutting concerns and infrastructure extension Next time we ll add a new feature to the application and see how to build vertical slices and why they are useful Sources and ReferencesLinks to books articles and other materials I mentioned in this post Source code for the current step on GitHubBlog s source code for typos and corrections Architecture and DesignCross cutting concern WikipediaDecorator compositionMore functional pits of successMore than concentric layersEncapsulation as Means for Abstraction Error HandlingError HandlingRethrowing Errors for Proper Stack Trace Networkingasync cache dedupeaxiosHTTP Cache Control Extensions for Stale ContentTanStack QueryuseSWR Other TopicsDecorator PatternGenerics in TypeScriptOpen closed principle WikipediaA quick introduction to pipe and compose in JavaScriptzustand persistP S This post was originally published at bespoyasov me Subscribe to my blog to read posts like this earlier 2023-08-21 08:17:46
海外TECH Engadget Threads web app could arrive this week https://www.engadget.com/threads-web-app-could-arrive-this-week-082645402.html?src=rss Threads web app could arrive this weekThreads by Instagram will get a web version as soon as this week people familiar with the matter told The Wall Street Journal Earlier this month Meta CEO Mark Zuckerberg promised a web version with better search functionality and Instagram head Adam Mosseri recently said that one is in testing Currently a full version of Threads is only available on iOS and Android with limited read only functionality on browsers A web version is near the top of the list of most desired features for Threads but the company is exercising caution with the release It s a little bit buggy right now you don t want it just yet Mosseri said Friday on Instagram As soon as it is ready we will share it with everybody else Threads recently added new features to Threads like the ability to set notifications and view posts in chronological order The company also started labeling state controlled media outlets after some were seen posting propaganda Another new update is the repost tab makes it easier to see all reposted content X previously called Twitter recently renamed retweets to the more generic reposts ironically following Threads lead nbsp A web version would be coming at a good time for Threads After a torrid launch with over million users signing on in the first week the number of daily active users DAUs dropped down to percent by mid August Still Threads is by far the most successful alternative to X which counted around million DAUs in August and million monthly active users X reported last year nbsp In any case the launch of a web version will be particularly useful for social media power users just when Twitter has put one of its key tools for those folks Tweetdeck permanently behind a paywall This article originally appeared on Engadget at 2023-08-21 08:26:45
海外科学 NYT > Science As Dolphins Die in Black Sea, Ukraine Builds Case for Ecocide Against Russia https://www.nytimes.com/2023/08/17/world/europe/russia-war-dolphin-deaths-ukraine.html As Dolphins Die in Black Sea Ukraine Builds Case for Ecocide Against RussiaThe animals are dying in droves in the Black Sea and Ukrainian officials are documenting the deaths hoping to prosecute Russia for the war s ecological toll 2023-08-21 08:32:44
金融 ニッセイ基礎研究所 タイ経済:23年4-6月期の成長率は前年同期比1.8%増~輸出低迷と投資停滞により景気減速 https://www.nli-research.co.jp/topics_detail1/id=75880?site=nli タイ経済年月期の成長率は前年同期比増輸出低迷と投資停滞により景気減速年月期の実質GDP成長率は前年同期比増前期同増と低下し、市場予想同増を下回る結果となった図表。 2023-08-21 17:35:39
ニュース BBC News - Home Asake pays tribute to Brixton Academy crush victims at return gig https://www.bbc.co.uk/news/newsbeat-66568450?at_medium=RSS&at_campaign=KARANGA brixton 2023-08-21 08:36:06
ニュース BBC News - Home Canada wildfires: Drone footage shows scale of destruction in Northwest Territories https://www.bbc.co.uk/news/world-us-canada-66568903?at_medium=RSS&at_campaign=KARANGA territories 2023-08-21 08:18:57
ニュース BBC News - Home Women's World Cup: Ellen White - England Lionesses' success will have lasting legacy https://www.bbc.co.uk/sport/football/66567147?at_medium=RSS&at_campaign=KARANGA Women x s World Cup Ellen White England Lionesses x success will have lasting legacyThe success of England s Lionesses at the Women s World Cup will have a lasting legacy says record scorer Ellen White 2023-08-21 08:36:20
マーケティング MarkeZine 【参加無料】デジタル環境の変化に負けない!ルシダスが提唱する、無駄な投資を削減する戦略とその構築法 http://markezine.jp/article/detail/43142 参加無料 2023-08-21 17:15:00
IT 週刊アスキー 福岡市動物園、開園70周年を記念したノベルティー配布や動物たちとのお祝い記念イベントを8月22日に開催 https://weekly.ascii.jp/elem/000/004/150/4150797/ 福岡市動物園 2023-08-21 17:20:00
IT 週刊アスキー ASUSの最新ウェアラブルウォッチ「VivoWatch 5」、ソフマップで販売中 https://weekly.ascii.jp/elem/000/004/150/4150819/ vivowatch 2023-08-21 17:30:00
IT 週刊アスキー Illumio、統合ソリューション「Illumio for Microsoft Azure Firewall」の一般提供を開始 https://weekly.ascii.jp/elem/000/004/150/4150778/ formicrosoftazurefirewall 2023-08-21 17:30:00
IT 週刊アスキー 三菱電機、省エネ・快適性を改善したルームエアコン「霧ヶ峰」30機種を10月6日より発売 https://weekly.ascii.jp/elem/000/004/150/4150827/ 三菱電機 2023-08-21 17:30:00
IT 週刊アスキー ラスタバナナ、Motorola製スマホ「moto g53j 5G/g53y 5G」対応の手帳ケースを発売 https://weekly.ascii.jp/elem/000/004/150/4150816/ motogjggyg 2023-08-21 17:15:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)